Skip to content

docs(loop): R17 -- a tick owns its worktree and takes a claim - #3358

Merged
gHashTag merged 1 commit into
masterfrom
s2-pass119-rules
Sep 6, 2026
Merged

docs(loop): R17 -- a tick owns its worktree and takes a claim#3358
gHashTag merged 1 commit into
masterfrom
s2-pass119-rules

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Refs #3357

Two sessions ran concurrently on 2026-09-06 sharing one checkout and one
target/, and neither had a way to find out.

What it produced

Every symptom was attributed to the tool being measured:

symptom first reading actual cause
commit "did not form", git push said success a git bug it pushed an unchanged HEAD
built binary lost a subcommand it had a minute earlier a bad build both sessions writing one target/
census readings flip-flopped between runs a flaky gate the tree changed between the two readings
HEAD on w119a-fold, a branch never created here the other session's five branch switches in five minutes

That is the broken-ruler error with a second session as the ruler.

The rule

R17 writes down what tri loop claim (#3332) made possible: own the tree, take
the claim first, and do not diagnose a shared tree through the tree. The claim is
a git ref, so the atomicity is the remote's compare-and-swap rather than a file
two machines both believe they hold.

The trap found while following it

A private CARGO_TARGET_DIR — the very thing that makes the tree private — hides
the binary from .githooks/pre-commit:52 and .githooks/commit-msg:14, which
probe $ROOT/target/{debug,release}/tri. They report "not built", refuse with
exit 2, and the commit silently does not form while the next push reports
success. I hit this in this pass, and the branch briefly pointed at master's HEAD
because of it.

R17 records the symlink and, more importantly, checking that git rev-parse HEAD
moved instead of trusting what git commit printed.

Seal

LOOP-RULES.sha256 moved with the rule file in the same commit — R6, the seal
certifies identity, not correctness.

…3357)

Two sessions ran concurrently on 2026-09-06 sharing one checkout and one
`target/`, and neither had a way to find out.

Every symptom was attributed to the tool being measured: a commit that "did not
form" while `git push` reported success (it pushed an unchanged HEAD), a built
binary that lost a subcommand it had a minute earlier, census readings that
flip-flopped between runs, and a HEAD sitting on a branch this session never
created. That is the broken-ruler error with a second session as the ruler.

R17 writes down what `tri loop claim` (#3332) made possible: own the tree, take
the claim first, and do not diagnose a shared tree through the tree.

It also records the trap found while following it. A private `CARGO_TARGET_DIR`
-- the thing that makes the tree private -- hides the binary from
`.githooks/pre-commit:52` and `.githooks/commit-msg:14`, which probe
`$ROOT/target/{debug,release}/tri`. They report "not built", refuse with exit 2,
and the commit silently does not form while the next push reports success. The
fix is a symlink where the hooks look, and checking that `git rev-parse HEAD`
moved rather than trusting what `git commit` printed.

Resealed: the rule file changed, so `LOOP-RULES.sha256` moved with it in this
commit. R6 -- the seal certifies identity, not correctness.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-06 05:13:35 UTC

Summary

Status Count
Total Open PRs 16
PRs with Failing Checks 10
PRs with All Checks Green 6
READY 3
FAILING 10
PENDING 0
NO CHECKS YET 0

These columns do not partition: 3 + 10 + 0 + 0 = 13, and there are 16 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=23f03e8a97d5 != 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).

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

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.

1 participant