Skip to content

tri t27o-sweep --repo <dir>: sweep another checkout, one cache per repository, a missing seal names its path (Closes #10638) - #10646

Merged
gHashTag merged 2 commits into
masterfrom
t27o/sweep-repo-10638
Oct 18, 2026
Merged

gHashTag merged 2 commits into
masterfrom
t27o/sweep-repo-10638

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Closes #10638. Lane X of epic #10522.

What changed

tri t27o-sweep [PATHS...] --repo <dir> sweeps another checkout:

  • the listing is git -C <dir> ls-files -- <paths> and the files are read under <dir>; rows still print paths relative to the swept repository;
  • the two seal keys (.trinity/seals/t27o_T27oRust.json, t27o_T27oRustStd.json) keep coming from the t27 checkout the command runs in (the current directory). A missing seal now names its absolute path and says to run from a t27 checkout, instead of a bare No such file or directory (os error 2);
  • one default cache per swept repository, target/t27o-sweep-<directory name>.tsv; no --repo, empty or . keeps target/t27o-sweep.tsv. --repo is canonicalized first, so trios, trios/ and a symlink to it share one cache. --cache still overrides;
  • a git ls-files failure (not a git repository) is now an error naming the directory, not a silent total 0 files.

Rules are in specs/tools/t27o/ledger.t27 (repo_is_here, cache_path, the seal paths and the hint as constants); cli/tri/src/main.rs is glue.

Tests

t27b test specs/tools/t27o/ledger.t27: 29 passed (23 before, 6 new); t27c test-report: 29 of 29, vacuous passes 0 of 29. The new tests pin: which --repo values mean this checkout, the exact cache path of this checkout, of trios, of 999-multibots-telegraf, of trinity-fpga, a trailing slash changing nothing, two repositories never sharing a cache (negative control), a path that does not fit the buffer being refused without a write, and the seal paths and hint. Seal re-saved and --verify MATCH; gen/rust/tools/t27o/ledger.rs regenerated.

Hand lines (own-language)

cli/tri/src/main.rs: 11 added, 11 deleted (net 0). The local budget gate (own_language.c from the merge base) prints rc=0.

Measured on this Mac (tri built from this branch)

Per file in target/t27o-sweep-<name>.tsv against the end-of-night per-file tri t27o loop (same commits): every file matches on fns seen, converted, translated tests, test total and stubs. 0 differing files in 1006 files (all of trios, 786, plus the other three).

repository files fn seen converted cold warm (all reused) night per-file loop
trios (crates) 759 7961 948 1.8 s 0.16 s 7.8 s
trios (.) 786 8230 967 2.1 s - 8.1 s
999-multibots-telegraf 167 982 32 0.44 s 0.05 s 2.2 s
trinity 23 182 8 0.05 s 0.03 s 0.3 s
trinity-fpga 30 273 22 0.11 s 0.03 s 0.4 s

Run from a non-t27 directory: Error: /private/tmp/.trinity/seals/t27o_T27oRust.json: cannot read the seal; run from a t27 checkout. A nonexistent --repo: Error: /Users/playom/nonexistent-x: cannot open the repository.

Deviations from the issue text

  • Seals come from the current directory, not std::env::current_exe: a copied binary has no checkout around it, and the cache path is relative to the current directory anyway.
  • The five Rust tests in cli/tri/src/sweep.rs are not added: hand Rust is what the own-language check counts, and the repo law puts decisions and their tests in the spec. The glue's behavior is the measurement above.

Traps

  • A sweep rewrites its cache with only the rows it saw, so sweeping crates and then . of the same repository evicts the other run's rows (pre-existing; use --cache for a second path set).
  • Two repositories with the same directory name share a cache: rows are keyed by file SHA, so results stay right, only cold.
  • Importing tri::t27b::text_escape into ledger.t27 makes t27b test report starts_at undeclared (a name clash in that import); put_text is imported from tri::t27b::macho instead, which adds macho.t27 to the ledger seal's dependencies.

🤖 Generated with Claude Code

claude and others added 2 commits October 19, 2026 03:27
…pository, a missing seal names its path (Closes #10638)

The listing (git -C <dir> ls-files) and the files come from <dir>; the two seal
keys keep coming from the t27 checkout the command runs in. A missing seal now
says which absolute path it looked for and to run from a t27 checkout.

The rules are in specs/tools/t27o/ledger.t27: repo_is_here (no --repo, empty or
".") and cache_path (target/t27o-sweep-<dir name>.tsv, "." keeps
target/t27o-sweep.tsv), with the seal paths and the hint as constants. Six new
tests, three of them negative controls. main.rs is glue only and gains no hand
line (11 added, 11 deleted).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…10638)

The message said "not a directory" for a path that does not exist at all;
it now says the repository cannot be opened and the cause follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag

Copy link
Copy Markdown
Owner Author

Review (orchestrator, Opus):

  • Re-checked on the PR head 271dc03: t27b test specs/tools/t27o/ledger.t27 29/29; cargo check -p tri clean; the own-language budget, compiled from the merge base exactly as CI does, rc=0 (main.rs +11 / -11).
  • DRY: repo_is_here and cache_path are new names. out_is (a test helper) has a namesake in rust_convert.t27 with an offset parameter; I tried use tools::t27o::rust_convert::out_is instead, and it pulls the whole 8,000-line converter into the ledger's dependencies and collides with macho's put_text (t27b: undeclared put_text). The 8-line helper is the smaller cost, so it stays. put_text is reused from macho.t27; only that fn is spliced into ledger.rs (+74 lines).
  • The lane's cross-check: per-file counts equal the end-of-night per-file sweep on all 1,006 files of the four other repositories; warm runs reuse every row.
  • Known limit kept (pre-existing, noted by the lane): a sweep rewrites its cache with only the rows it saw, so sweeping crates and then . of one repository evicts rows. Auto-merge on.

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 20:57:25 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 45
PRs with All Checks Green 5
READY 2
FAILING 45
PENDING 0
NO CHECKS YET 0

These columns do not partition: 2 + 45 + 0 + 0 = 47, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

gHashTag added a commit that referenced this pull request Oct 18, 2026
… scan is green again (Closes #10653) (#10654)

The cache_path and repo_is_here tests used /Users/playom/... literals
(9, merged with #10646); tools/check_devhome_paths.py reported them as
new and turned the scan red for every later pull request. The rule reads
only the last path component, so /srv/checkouts/... keeps every expected
value. t27b 29/29; the devhome check prints OK; gen-rust unchanged
(tests are not lowered); seal re-saved, --verify MATCH.

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 19, 2026
… sweep and Zig front end, build traps (Closes #10826) (#10827)

What the overnight loop of #10522 paid for after #10542: dupe_scan for
bodies (#10801 passed a name check with 13 copied bodies), the
own-language gate compiled from the merge base, devhome literals
(#10646), seals of specs that use rust_convert, drafts as the only hold
(auto-merge off did not stop #10801), the stacked-PR rebase recipe, a
writable cloned CARGO_HOME, a private zig cache per lane, zsh traps, the
splice that matches string literals (#10824); tri t27o-sweep and the Zig
front end documented; stale timings updated.

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] tri t27o-sweep cannot sweep another repository: seals and git ls-files are read from the current directory

2 participants