Skip to content

fix(tri): window refuses a failed fetch, a foreign record, and a rewind - #3382

Merged
gHashTag merged 5 commits into
masterfrom
window-hardening
Sep 6, 2026
Merged

fix(tri): window refuses a failed fetch, a foreign record, and a rewind#3382
gHashTag merged 5 commits into
masterfrom
window-hardening

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Closes #3381

Five defects in tri window as merged, from an adversarial pass in which eight of eight candidates survived refutation.

The one that matters, and it is sharper than I had it. --check discarded the fetch's exit code. resolve reads the LOCAL origin/master, which a failed fetch leaves exactly where --start recorded it — so tip == recorded becomes true and the command certifies as clean the single failure it exists to prevent.

The verifier added the part I had missed: the failure is perfectly correlated with the case the guard exists to catch. A stale refs/remotes/origin/master.lock — routine with ~150 worktrees on one shared object store — makes git fetch fail only when there is something to fetch. Measured in one repository, seconds apart, same lock:

git fetch -q origin   (local ref already current)  -> exit 0
git fetch -q origin   (one PR pending)             -> exit 1
tri window --start    -> refuses:  could not fetch ... Nothing was recorded.
tri window --check    -> window intact: origin/master is still b77800cf54d8   EXIT 0

The instrument goes blind precisely and only when the base moved, and reports that blindness as intact.

fetch status ignored in --check now refuses, in --start's own words
fetch hardcoded to origin derived from the base; a local branch, tag or sha is "nothing to fetch, nothing to be stale"
&recorded[..12] on a short record panicked, exit 101; now truncates
recorded ref name never read back --start --base A then --check --base B called two branches a move
a rewind said 0 merge(s) landed in between; now names the rewind
a record that is not a sha exits 2 — could-not-run, not a move

Attribution. The fetch repair came from an adversarial agent that edited this worktree directly: my brief forbade pushing and other people's branches, and did not forbid editing. Reviewed line by line and kept.

And one defect was mine, made while fixing theirs. A blind re.sub('&sha[..12]' → 'short(&sha)') rewrote the body of short itself into a self-call — infinite recursion, presenting as a hang with no output. Four probes went to the network, git locks, concurrent agent builds and stdin inheritance before I looked at where the output stopped: after the fifth control, before the sixth, which is the one that tests short.

Eight controls, twelve tests.

lab added 3 commits September 6, 2026 15:20
69 merges landed on master in 24 hours here, one every 21 minutes, while a
corpus measurement takes 15-30. The base moves during almost every measurement,
and two failures follow: a delta that is a neighbour's work, and a defect that
was repaired upstream while it was being fixed here. Both are one question.

Census re-blessed in this same commit: `fetches` moved `files read` by one,
which is this commit's own new file cli/tri/src/window.rs.
…nd (Refs #3379)

The fetch-exit-code repair is from an adversarial agent that edited this
worktree directly -- the brief forbade pushing and other branches, not editing.
Reviewed line by line and kept: --check discarded the fetch's status, so a
failed fetch left the local ref where --start recorded it and the command
certified as clean the failure it exists to prevent.

Three more by hand: a short record panicked at [..12]; the recorded ref name was
never read back; a rewind said '0 merge(s) landed'. And one of mine: a blind
regex rewrote short()'s own body into a self-call, an infinite recursion that
presented as a hang.
@gHashTag
gHashTag enabled auto-merge (squash) September 6, 2026 09:07
lab added 2 commits September 6, 2026 16:12
Census re-blessed in this same commit; it moved with the commits merged in.
The squash of #3380 put this branch's own parent content on master as an
unrelated commit, so all ten regions conflicted. Resolved to this branch's
version after checking it is a superset: the thirteen lines only master had are
exactly the ones these fixes replace -- `&recorded[..12]` and the hardcoded
`fetch origin`.
@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.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-09-06 09:20:46 UTC

Summary

Status Count
Total Open PRs 15
PRs with Failing Checks 10
PRs with All Checks Green 5
READY 4
FAILING 10
PENDING 0
NO CHECKS YET 0

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b1f4644c92c7 != 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
gHashTag merged commit 0fc7a9f into master Sep 6, 2026
29 checks passed
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.

tri window as merged: --check certifies a window it could not read

1 participant