Skip to content

Land on the organization's repository as the merging account; stale-review rule and local reviews for the Codex gate - #1061

Merged
seathatflowsinourveins merged 4 commits into
mainfrom
foundation/landing-org-local-codex-20261013
Oct 13, 2026
Merged

seathatflowsinourveins merged 4 commits into
mainfrom
foundation/landing-org-local-codex-20261013

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

  • What this PR changes:
  • Base commit: c63c83a822f2687c3e7aed2d3b3ede0413119c9b
  • Lane: lane:foundation
  • Owned paths touched:
    • tools/landing/ (README.md, codex_gate.py, nas_land.sh, uet_land.sh, new review_normalize.py);
    • tests/test_landing_scripts.py;
    • manifests/evidence.json (the six records of those files).

Per item

  1. Repository slug.
    • R=${LANDING_REPO:-native-agent-stack/native-agent-stack}. The old slug is redirected, but GitHub deletes those redirects if a repository is created at the old location, so the default is the new slug.
    • Since the third commit, R must have GitHub's owner/name shape (exit 2 before any call), and every -R "$R" is quoted. Since the fourth, the rule cites the REST API's owner and repo path parameters and the docs' repository-name rule.
  2. No-reply author (Wire the order-contract boundary into every Alpaca paper submit (local refusal before any network call) #198).
    • The shared lg_author_email uses ${LG_AUTHOR_LOGIN:-<R's owner>}, and both scripts set LG_AUTHOR_LOGIN=${LG_AUTHOR_LOGIN:-seathatflowsinourveins}.
    • A login that is not GitHub's shape is refused before any call. Since the third commit, only a users/<login> reply of type User gives an id (exit 11 otherwise). Since the fourth, the filter cites the API: type is a free string, "User" in its example and "Organization" for an organization's account.
    • The address form <id>+<login>@users.noreply.github.com is unchanged.
  3. Stale running review (Reconcile trading records with merged evidence (runtime-target, snapshot gate, dashboard, new-host EdgarTools receipt) #200).
    • The operational block, byte for byte: a row shown running with no connector activity for 90 minutes gives 5.
    • Since the third commit, the age runs from the later of the last activity and the latest trigger, and a trigger after a stall gets the 10-minute NOSTART grace.
    • Since the fourth commit:
      • the latest review of our head since the trigger decides: one that ended other than Completed gives 4, before the stale 5 and before a 0, whatever completed before it, while a later completion still supersedes it;
      • the 👀 reaction with no Running row waits (3) with no bound again, as at c999eee.
    • OpenAI's Codex docs state no review time limit. The value's measured basis is nas#1056, and it lives in one constant.
  4. Local reviews. The gate decides from the files alone and calls nothing. codex review is the required arm; the /code-review plugin is advisory until the review-replay addendum measures it.
    • A codex-review file carries Codex's verdict (patch is incorrect blocks with 4; any other value than the two stops with 2) and, since the third commit, the merge base its review request named.
    • lg_gate passes the gate <head>:<git merge-base <head> origin/main> for the read head and each pure rebase of it (the scripts' lg_same_change). A review against another base stops (2).
    • Since the third commit, a set but empty variable stops (2) instead of falling back to the connector.
    • Since the fourth commit, nas_land.sh requires local reviews. With neither variable set it stops with 2 before any call. The one exception is LOCAL_REVIEW_WAIVER, a file whose last Waiver: line reads Waiver: local reviews for #<pr> at <head8>. It is checked in verdict_gate and again by final_gate. A waived landing asks the connector as before, and its squash body records the waiver after GitHub's default body. uet_land.sh is unchanged.

The third commit: CHANGES_REQUESTED at c999eee, all three reviews

  • The CC's Claude read.
    • P1 base: the review's base is checked.
    • P1 empty variable: a set but empty variable stops.
    • P2 order: our head's failed review gave 4 before the stale 5 only when no review of our head had completed. Astra's read at 974090c showed that an earlier completion still hid it, and the fourth commit fixes this (below).
    • The four P3s: the LANDING_REPO shape and quoting, type == "User", the Legacy rollout refused (fail closed, documented), and the bounded 👀. The fourth commit reverts the bound.
  • The CC's /code-review probe (advisory).
    • Finding 1: the trigger grace.
    • Finding 4: the docs search, with the measured basis recorded.
    • Finding 8: codex_wait's message on a local 2.
    • Finding 9: the plugin comment is bound to --head by its full-SHA links.
  • Astra.
    • P1-1: a set but empty variable stops (2). The residual Astra reproduced was an unset variable that proceeded on the connector's 5; it stood as policy at that commit. The fourth commit closes it on nas, where local reviews are now required.
    • P1-2: covered by the base check, with Astra's regressions: missing branch, another branch, base = head, base = head^, and the correct base.
    • P1-3: every digest and prefix of a host-only file (the CC's live copies) is removed from the README and this body, and a test refuses any that returns.
    • Follow-up 1 (fixed): a refused retry removes the earlier --out file.
    • Follow-up 2 (fixed): the gate refuses a non-finite confidence.
    • Follow-up 3: covered by P1-3.

The fourth commit: CHANGES_REQUESTED at 974090c, the CC's Claude delta and Astra

  • The CC's Claude delta.
    • P1-1 closed on nas, by the CC's ruling: local reviews are required.
      • With neither variable set, nas stops with 2 before any call: before the lock, update-branch and ready.
      • The only exception is a waiver bound to the pull request and the read head's first 8 hex digits. It is read in verdict_gate, again by final_gate, and recorded in the squash body.
      • The check is in neither the shared block nor codex_gate.py, and uet_land.sh keeps the connector path.
    • The 👀 path waits (3) again, so this PR opens nothing new.
    • P3 sources: github/rest-api-description@58b1e0c0 for the users API's type and the owner/repo parameters, with the docs' repository-name rule.
    • P3 digest guard:
      • it reads any letter case and bare prefixes, and a commit id must be a named public commit;
      • it reads the four scripts, and the body when LANDING_PR_BODY names it;
      • its known digests are only the files git tracks.
  • Astra's P2. An earlier completion after the trigger hid a later Cancelled review of the same head, so with another stale Running row the gate gave 5 instead of 4.
    • The latest review of our head since the trigger decides now, before the stale branch and before a 0.
    • Astra's sequence gives 4; it gave 5 at 974090c.
    • The same two reviews with no row running give 4; they gave 0 at 974090c. The base's test, which pinned "any completion evidence passes", is flipped.
    • The false claims in this body's earlier text and at the README's former :69 are corrected.
  • Astra's follow-ups, the one-line fixes.
    • 2: the README states that a clean plugin comment binds no head.
    • 3: the probe's findings 6 and 7 are recorded below, with triggers.
    • 4: sources are cited for each mechanism: the set-or-unset tests (bash(1), cpython's os.environ), the users API's type, the repository name, os.replace and os.unlink, and json with math.isfinite.
    • 6: the date is on the test comment.
    • The other follow-ups are listed under Follow-ups.

SOTA sources

Evidence-class table

Claim Evidence class Command / receipt
The first commit's tests fail on the code before it local_integration that module run against git archive c63c83a8 tools/landing tests: FAILED (failures=104, errors=7)
The second commit's tests fail on the first local_integration its module run against git archive a6c8bf7c tools/landing tests: 134 tests, FAILED (failures=76, errors=2)
The third commit's tests fail at c999eee local_integration the module of that commit run against git archive c999eee5 tools/landing tests manifests/evidence.json: 144 tests, FAILED (failures=164, errors=2); the README custody check finds 7 full digests and 4 prefixes there
The fourth commit's tests fail at 974090c local_integration the final module run against git archive 974090cf tools/landing tests manifests/evidence.json, made a git work tree: 156 tests, FAILED (failures=31, skipped=1)
The guard's probes are missed at 974090c local_integration 974090c's readme_digest_custody on the new probes: 0 of 5 found (upper case, an upper-case prefix, a bare prefix, ASCII dots, a longer run), and an untracked file's digest passed
The fixed code passes them local_integration python3 -m unittest tests.test_landing_scripts: 156 tests OK (skipped=1, the body check, which needs LANDING_PR_BODY), also with CI=true; with LANDING_PR_BODY naming this body, the body check passes
The #200 block equals the CC's live copy local_integration byte comparison of the block and constant with the live codex_gate.py: identical (no digest of the live copy is published)
The landing lock stays held through each local-review gate call local_integration flock -n -E 75 probe at every gate call: held; after the landing: free
The review's base on real data local_integration the 6 local baseBranch rollouts, read only: 3 named git merge-base <head> origin/main; 3 delta reviews covered 1, 1 and 2 commits, leaving out 1, 5 and 1
Rollout shape, and the normalizer on 3 real local rollouts local_integration the baseBranch review of 8eb4b53 completed; a custom and an uncommittedChanges rollout refused on their target
A waived landing's default squash body local_integration the script's viewerMergeBodyText query on this pull request, read only: the commit messages; squashMergeCommitMessage is COMMIT_MESSAGES
Codex structs, prompt, Legacy fallback and verdict; plugin format; docs; redirects; no-reply form; users API; repository name; gh's body flow; bash and Python semantics source_review the pins above
The redirect of the old slug (REST, GraphQL, gh -R) source_review the CC's measurement on the moved repository, cited; not reproduced here
The headless commands in the README, the plugin's run, a landing on local reviews or on a waiver against GitHub untested documented as commands only; running the plugin posts a comment

Local commands run

$ python3 -m unittest tests.test_landing_scripts      (LANDING_PROHIBITED_NAMES from the CC's list)
Ran 156 tests in 93.126s
OK (skipped=1)
$ CI=true python3 -m unittest tests.test_landing_scripts
Ran 156 tests in 91.708s
OK (skipped=1)
$ python3 -m unittest tests.test_landing_scripts      (against 974090cf's tools/landing)
Ran 156 tests in 100.928s
FAILED (failures=31, skipped=1)
$ LANDING_PR_BODY=<this body> python3 -m unittest tests.test_landing_scripts.ScriptTextTests.test_the_pull_request_body_binds_published_bytes
Ran 1 test in 0.021s
OK
$ python3 -m unittest tests.test_validate_shards
Ran 13 tests in 3.658s
OK
$ python3 -m unittest tests.test_published_digest_privacy      (with the names)
Ran 15 tests in 12.728s
OK
$ python3 -m unittest tests.test_evidence_manifest
Ran 5 tests in 0.005s
OK
$ python3 scripts/validate.py
{"components": 71, "hashed_files": 11861, "profiles": 4, "receipts": 240, "status": "passed"}
$ python3 scripts/evidence_manifest.py --check
{"files": 11861, "status": "passed"}
$ gitleaks git --staged --no-banner --redact .        (and --log-opts="c63c83a8..HEAD")
INF no leaks found (exit 0)
$ privacy_scan.sh <the added lines> <the commit message> <this body>
clean (exit 0)

shellcheck was not run: CI does not run it on these scripts, and it is not installed on this host. bash -n passes for both.

Decision record

None separate. The README's "Local reviews" section and its 2026-10-13 sources tables record the schema, the required and advisory arms, the base rule, nas's requirement and its waiver, the pins, the measured facts and the untested boundaries.

Host evidence

Not applicable: no file under evidence/hosts/ changes.

Checklist

  • No GitHub Actions or workflows changed.
  • No workflow permissions changed.
  • No secrets are printed, logged or committed; no new secret.
  • No new paid hosting, subscription or billing surface.
  • Peer-owned untracked files and worktrees were preserved.

Risks

  • --commit reviews are refused. The normalizer accepts only a baseBranch review, the pull request's whole change against its base. A review the co-op wrapper runs with --commit covers one commit and is refused, so the required arm must run in the wrapper's default mode, against the head's merge base with origin/main.
  • The latest-review rule also applies on uet's connector path. One trigger can be followed by a completion and then a Cancelled review of the same head. That now stops both scripts (4, exit 9) where it passed, so a person decides. A re-run that completes after the failure lands as before.

Follow-ups

  • Astra's follow-up 1 at 974090c. A usage error in review_normalize.py (exit 2, such as --head bad) leaves an earlier --out file. Trigger: retry automation, or a claim that every failed attempt invalidates the output.
  • Astra's follow-up 2. A clean plugin comment binds no head; the README's Known gaps state it. Trigger: before the plugin arm becomes required.
  • Astra's follow-up 3, the probe's findings 6 and 7.
    • The owner fallback of lg_author_email is reachable only through the shared helper, since both scripts set a login. Trigger: the helper's calling convention changes.
    • lg_gate repeats per-file git work at every gate call. Trigger: large local review sets or repositories; measure it first.
  • Astra's follow-up 4. The aggregate fail-before counts and the compatibility controls are this body's figures, not packaged receipts.
  • Astra's follow-up 5. PUBLIC_DIGESTS names public artifacts but does not verify their bytes against a mirror. Trigger: the guard's next change.
  • Astra's follow-up 6 (inherited). Host-name occurrences on 18 unchanged lines of manifests/evidence.json; this PR changes none of them.
  • Astra's follow-up 7. The cited captures are not packaged: the rollout and live-copy measurements, nas#1056's activity capture, the client-version captures and the fail-before receipts. Packaging them is a records task.

🤖 Generated with Claude Code

@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Oct 13, 2026
…tale-review rule and local reviews to the Codex gate

- nas_land.sh: R comes from LANDING_REPO, default native-agent-stack/native-agent-stack. GitHub
  redirects the old slug (github/docs@be38ec5d transferring-a-repository.md:62) until a repository
  is created at the old location (:68-69).
- Both scripts (CC correction #198): the no-reply author is LG_AUTHOR_LOGIN, default
  seathatflowsinourveins, and R's owner only when it is unset. A login of another shape is refused
  before any call (exit 11). The form <id>+<login>@users.noreply.github.com is unchanged
  (email-addresses-reference.md:47).
- codex_gate.py (CC correction #200): a review shown running with no connector activity for 90
  minutes gives 5. This is the CC's operational block, ported byte for byte.
- Local reviews: LOCAL_REVIEWS, with its alias CODEX_LOCAL_REVIEW, names normalized review files,
  and the gate decides from them alone:
  - 2 for a file that is malformed, of another head or not completed;
  - 4 for a P0 or P1 finding;
  - 0 otherwise, with P2 and P3 counted.
  lg_gate passes on the heads that carry the read head's change (lg_same_change).
- review_normalize.py writes the normalized files from a `codex review` rollout
  (openai/[email protected]) or from the /code-review plugin's comment
  (anthropics/claude-plugins-official@f359d43b).
- The new tests fail at c63c83a (104 failures, 7 errors) and pass here (133 tests).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eview arm advisory

The CC's follow-up to the first commit of this pull request.

- review_normalize.py carries Codex's overall_correctness verbatim, and overall_confidence_score when
  present. openai/[email protected] rubric.md:85 fixes "patch is correct" | "patch is incorrect",
  while the wire type is a free String (protocol.rs:3507). The mirror at 092d3acd6 holds the same
  bytes as the tag.
- codex_gate.py:
  - "patch is incorrect" blocks (4), whatever the findings' priorities;
  - any verdict other than exactly those two stops (2), as does a set with no completed
    codex-review (the required arm).
- The /code-review arm is advisory until the review-replay addendum measures it (arms E and F).
  Below a score of 80 the plugin does not proceed to its comment (code-review.md:26), and it
  skips a pull request it already reviewed (:11). So its issues are counted and a missing comment
  is noted, and neither stops the gate.
- The new tests fail at a6c8bf7 (134 tests: failures=76, errors=2) and pass here (134 tests).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ty variable, refine the stale rule, drop host-only digests

From the CHANGES_REQUESTED reads at c999eee: the CC's Claude read, the CC's /code-review probe and
Astra's read.

- P1, the base: a codex-review now records the merge base its request named (openai/[email protected]
  review_request.rs:21, :62-70; branch.rs:13-15), and lg_gate requires it to be
  git merge-base <head> origin/main. Base = head and base = head^ stop.
- P1, an empty variable: a set but empty LOCAL_REVIEWS or CODEX_LOCAL_REVIEW now selects local mode and
  stops (2), instead of falling back to the connector.
- P2, the order: a review of our head that ended other than Completed gives 4 before the stale 5. A
  trigger after a stall gets the NOSTART grace, and the eyes reaction with no Running row is bounded.
- #200's value: OpenAI's Codex docs state no review time limit. The README records the measured basis
  (nas#1056) and keeps the value in one constant.
- P3s:
  - LANDING_REPO must have the owner/name shape, and every -R "$R" is quoted;
  - users/<login> must be of type User;
  - Legacy rollouts are refused, fail closed (exec/src/lib.rs:1425-1432; rollout/src/policy.rs:141-155);
  - codex_wait gives a local 2 its own message;
  - the plugin comment is bound to --head by its full-SHA links.
- Astra P1-3: the README carries no digest or prefix of a host-only file any more, and a test refuses any
  digest that is neither a tracked file's nor a named public artifact's.
- Astra's follow-ups 1 and 2: a refused retry removes the earlier --out file, and a non-finite
  confidence stops the gate.
- The new tests fail at c999eee (144 tests: failures=164, errors=2) and pass here (144 tests).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e eyes bound, harden the digest guard

The fixes for the CC's Claude delta and Astra's read at 974090c, both
CHANGES_REQUESTED:

- nas_land.sh requires local reviews (the CC's ruling). With LOCAL_REVIEWS
  and CODEX_LOCAL_REVIEW both unset it stops with 2 before any call, before
  the lock, update-branch and ready. The one exception is
  LOCAL_REVIEW_WAIVER: a file whose last Waiver line reads "Waiver: local
  reviews for #<pr> at <head8>", checked in verdict_gate and again by
  final_gate. A waived landing asks the connector as before and records the
  waiver in its squash body, after the body GitHub offers for the squash
  (viewerMergeBodyText, where gh's own edit step starts). uet_land.sh keeps
  the connector path; neither the shared block nor codex_gate.py changes
  for this.
- codex_gate.py, Astra's P2: the latest review of our heads since the
  trigger decides. An earlier completion hid a later Cancelled review:
  beside a stale row of another commit the gate gave 5, and with no row
  running 0. Both give 4 now; a later completion still supersedes a
  failure. The base's test that pinned "any completion evidence passes" is
  flipped.
- codex_gate.py: the connector's eyes reaction with no Running row waits
  (3) with no bound again, as at c999eee; 974090c's 5 was a new opening.
- Sources cited: the users API's type and the owner/repo parameters
  (github/rest-api-description@58b1e0c0), the repository-name rule
  (github/docs@be38ec5d), the set-or-unset tests (bash(1), cpython
  v3.13.16 os.environ), os.replace and os.unlink, json's number parsing
  and math.isfinite.
- The digest guard reads any letter case and bare prefixes (a commit id
  must be a named public commit), the four scripts and, with
  LANDING_PR_BODY, a pull request's body; its known digests are the files
  git tracks.
- README: the requirement and the waiver, the latest-review rule, the
  eyes revert, the guard and its residuals, the clean-comment limit, the
  sources and the files as committed. manifests/evidence.json: the six
  records.

The module run against 974090c's tools/landing: 156 tests, FAILED
(failures=31, skipped=1). The guard's probes are measured against
974090c's guard, which finds none of them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@seathatflowsinourveins
seathatflowsinourveins force-pushed the foundation/landing-org-local-codex-20261013 branch from f9266fd to 8374e91 Compare October 13, 2026 06:24
@seathatflowsinourveins
seathatflowsinourveins merged commit 33bbb11 into main Oct 13, 2026
31 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the foundation/landing-org-local-codex-20261013 branch October 13, 2026 06:51
seathatflowsinourveins added a commit that referenced this pull request Oct 13, 2026
… uet_land.sh

The CC's read of #1075's first commit: codex_gate.py now decides with LOCAL_REVIEW_ADJUDICATION
wherever it is set. uet_land.sh runs the same gate, but would neither bind the record to the pull
request and the head nor record it in a squash body. Either variable can be inherited, for
example from a nas landing in the same shell, so the first commit created the gap.

- uet_land.sh stops with exit 2 when LOCAL_REVIEW_ADJUDICATION or SQUASH_BODY_FILE is set, an
  empty value included (${VAR+x}, the #1061 P1 test). It prints one line naming the variable as
  nas-only, before the lock and any call (uet_land.sh:34-40, outside the shared block).
- Tests:
  - uet_land.sh with each variable set, to a valid record beside the local review it decides
    or a body file, and to an empty value, gives exit 2 with no call of any kind, a held lock
    included;
  - the text test that pinned "not in uet_land.sh" now pins the refusal: once, after the
    arguments, before the shared block and the lock, and read nowhere else.
  At 25a9b48 each of these landings merged, the valid record on the gate's adjudicated 0.
- README: "A nas input in a uet landing", uet_land.sh in the variables table and the exit codes,
  the gap removed from Known gaps, and the new digests. manifests/evidence.json re-registers the
  changed files (scripts/host_receipts.py register_file).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins added a commit that referenced this pull request Oct 13, 2026
… review; port SQUASH_BODY_FILE (#1075)

* Let the CC's adjudication decide a P2-only "patch is incorrect" local review; port SQUASH_BODY_FILE

The CC's ruling of 2026-10-13: after a pull request's bounded rounds, a local re-review that says
"patch is incorrect" with only P2 and P3 findings is decided by the CC, not looped. Until now
codex_gate.py gave 4 for it whatever the priorities (codex_gate.py:52, :327-329 at 993cc89).

- codex_gate.py: LOCAL_REVIEW_ADJUDICATION names the CC's record. It turns that 4 into 0 only when
  all of these hold:
  - no codex-review has a P0 or P1 finding;
  - exactly one says "patch is incorrect";
  - the record's last Adjudication line names that file's sha256 (of the bytes the gate parsed),
    the pull request and the read head;
  - its Finding lines are exactly that review's findings, one disposition each (fixed, follow-ups
    or rejected).
  The gate renders each finding's lines and compares whole lines. Anything else stays 4, with a
  reason in fixed words. A record set where no review says "patch is incorrect" also gives 4, so
  no squash body records a record that no gate checked.
- nas_land.sh verdict_gate reads the record once at each check (lg_text), as it reads the waiver.
  The record must name the pull request, the read head and a listed review file, and at the final
  gate the same file as at its first read; otherwise exit 2. The squash body records
  "Adjudication: local review <sha256> for #<pr> at <head8> (LOCAL_REVIEW_ADJUDICATION)".
- nas_land.sh SQUASH_BODY_FILE comes from the CC's live copy (gh pr merge --body-file). These stop
  with exit 2 before the lock:
  - "-";
  - a value that is not a readable, non-empty regular file;
  - a set but empty value (the live copy took it for unset).
  Beside a waiver or an adjudication, the body is the file's text, a blank line and that line,
  because gh takes --body or --body-file, never both (cli/[email protected]
  pkg/cmd/pr/merge/merge.go:138-143, :146-153, :177; pkg/cmdutil/file_input.go:8-15).
- README: the variables, the exit codes, "Local reviews", "The squash body" and the sources.
  manifests/evidence.json re-registers the four files (scripts/host_receipts.py register_file).
- The new tests fail at 993cc89 (51 failures, 1 error, all in the 9 new tests) and pass here.
  The module ran 165 tests: OK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Refuse the nas-only LOCAL_REVIEW_ADJUDICATION and SQUASH_BODY_FILE in uet_land.sh

The CC's read of #1075's first commit: codex_gate.py now decides with LOCAL_REVIEW_ADJUDICATION
wherever it is set. uet_land.sh runs the same gate, but would neither bind the record to the pull
request and the head nor record it in a squash body. Either variable can be inherited, for
example from a nas landing in the same shell, so the first commit created the gap.

- uet_land.sh stops with exit 2 when LOCAL_REVIEW_ADJUDICATION or SQUASH_BODY_FILE is set, an
  empty value included (${VAR+x}, the #1061 P1 test). It prints one line naming the variable as
  nas-only, before the lock and any call (uet_land.sh:34-40, outside the shared block).
- Tests:
  - uet_land.sh with each variable set, to a valid record beside the local review it decides
    or a body file, and to an empty value, gives exit 2 with no call of any kind, a held lock
    included;
  - the text test that pinned "not in uet_land.sh" now pins the refusal: once, after the
    arguments, before the shared block and the lock, and read nowhere else.
  At 25a9b48 each of these landings merged, the valid record on the gate's adjudicated 0.
- README: "A nas input in a uet landing", uet_land.sh in the variables table and the exit codes,
  the gap removed from Known gaps, and the new digests. manifests/evidence.json re-registers the
  changed files (scripts/host_receipts.py register_file).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Bind the adjudication to the recorded review, tighten the record, and check the body file's content

The three reads of #1075 at ca6f880: the Claude read (CHANGES_REQUESTED, no P0 or P1), the
co-op's local codex review (pr1075-ca6f880b, two P2s) and Astra's first read (CHANGES_REQUESTED,
two P2s).

- The digest the gate decides on (the co-op's P2 at codex_gate.py:391-392, Astra's P2-2):
  nas_land.sh exports the review file's sha256 from the record's first read as
  LG_ADJUDICATION_SHA256, cleared at the start. codex_gate.py adjudicates only the file whose bytes
  have it, so files replaced between nas's final read and the gate's no longer pass on review B
  while the squash body records review A.
- The body file's content (the co-op's P2 at nas_land.sh:585-586, Astra's P2-1): one bounded reader
  refuses a NUL byte, more than 64 KiB, anything but strict UTF-8 and a file with no text. It reads
  before any call (exit 2), when the body is built (exit 7) and at the final gate (exit 7, also when
  the text changed). The merge takes that snapshot as --body, alone too: --body-file would read the
  file again after the final gate. The 64 KiB bound is under one argument's MAX_ARG_STRLEN
  (torvalds/linux v6.18 include/uapi/linux/binfmts.h:15). The waiver or the record is also read and
  checked again when the body is built.
- The record (the Claude read):
  - P3-1: a NUL byte stops both layers (nas_read; the gate);
  - P3-2: only the Finding lines after the last Adjudication line count;
  - P3-3: one line for each finding, identical ones included, a line beyond the review's count
    refused, and the dispositions counted a line each;
  - P3-4: LOCAL_REVIEW_ADJUDICATION on the waiver path stops with exit 2 before any call;
  - P3-5 (the CC's ruling): a "patch is incorrect" review with no finding is not adjudicable.
- P2-1, the sha256 forms, cited in the README ("The sha256 forms") and in both scripts:
  - cpython v3.13.16 hexdigest is lowercase (Modules/_hashopenssl.c:652, Python/pystrhex.c:145-148,
    :88-89, Python/codecs.c:20; Doc/library/hashlib.rst:217-220 says only "hexadecimal digits");
  - uutils coreutils 0.10.0 sha256sum prints hex::encode, lowercase in hex 0.4.3, then a space,
    the Text mode's space and the name (measured too).
- The coverage asked for: a record bound from the start to another listed file (it kills a mutant
  of the gate's binding check, measured), an adjudicated landing through CODEX_LOCAL_REVIEW, a title
  holding ( and ), and a record and a body file of mode 000.
- README: "The squash body", "The CC's adjudication", "The sha256 forms", the variables, the exit
  codes, the known gaps (rejected-with-evidence is the CC's to review, Astra's P3), the tests, the
  sources and the digests. manifests/evidence.json re-registers the changed files.
- The new tests fail at ca6f880 (30 failures and 1 error, all in the 13 new or changed tests) and
  pass here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Write the squash body file's bytes, not locale-encoded text; correct nas_land.sh's header

The co-op's local re-review of #1075 at f3f1cab raised one P2, which the CC's delta read found too
and adjudicated as fix in this landing.

- nas_land.sh:95, the body reader: it wrote the decoded text through sys.stdout, whose encoding is
  the locale's (cpython v3.13.16 Doc/library/sys.rst:1838-1839). Under an ISO-8859-1 locale "é"
  came out as the one byte e9, and "€" ended the reader with nothing written (UnicodeEncodeError,
  exit 1), while every check passed. It now writes the validated bytes through sys.stdout.buffer,
  their trailing CR and LF bytes dropped as before.
- The test compiles an ISO-8859-1 locale with localedef into a scratch LOCPATH (glibc, locale(7)).
  LC_ALL=C cannot show the defect: Python turns on its UTF-8 Mode for the C or POSIX locale
  (Doc/library/os.rst:142-144; measured: utf8_mode 1, stdout utf-8). The reader's output must be
  the file's bytes under that locale for "é" and "€", with a C.UTF-8 control, and a landing under
  it must carry the body's UTF-8 bytes. Where no such locale can be compiled, the test is skipped.
  At f3f1cab it fails: 3 failures.
- The doc-only P3-2: the header's exit 2 and exit 7 lists now match the code, the body is passed as
  --body, and "-" is refused because to gh --body-file it means standard input, while this reader
  would open a file called "-".
- README: the reader's bytes, the shifted line citations, the test and the digests.
  manifests/evidence.json re-registers the changed files (scripts/host_receipts.py register_file).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant