Repository navigation
Record second-door-to-a-gated-answer in the ledger, with the gate inventory test that holds it - #23
Open
sumerjohal wants to merge 2 commits into
Open
sumerjohal wants to merge 2 commits into
sumerjohal wants to merge 2 commits into
Conversation
…s it Four of the six findings in the 2026-10-08 review are one defect: a route is gated carefully, and then a second route, a header, a flag or a self-typed claim answers the same question with no credential. The reverse lot index (#19), the shared secret (#20), AR_ACCOUNT_L1 (#22) and the hub's role-derived capability (ar2-hub#9). Ledger: four occurrences, kind mechanized, enforced by app/tests/test_gate_inventory.py. The test walks the mounted routes, selects the ones whose answer is gated, and requires each handler to call a gate function and read no environment variable. An empty inventory fails. Five doors open on this tree are listed with the PR that closes each, xfail, and required to still fail: when the PR merges the test goes red until the waiver is removed. Verified by checking out #22's router onto this branch: four waivers flipped to FAILED. Two corrections from re-saving the ledger through the CLI: one lesson's enforced_by was a bare string the loader split into characters on every save, restored as a one-element list; the seed note is kept. AGENTS.md briefing regenerated. stomata run: 12/12, K now 7/7. Co-authored-by: Cursor <cursoragent@cursor.com>
… not 2a9a3ea Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Four of the six findings in the 2026-10-08 review are one defect wearing different clothes: a route is gated carefully, and then a second route, a header, a flag or a self-typed claim answers the same question with no credential. #19, #20, #22 and ar2-hub#9 each close one door. This PR records the pattern in the lessons ledger and adds the check that holds it, per the harness's own rule that a lesson at or above the threshold must name a test that exists.
Ledger
second-door-to-a-gated-answer, four occurrences dated 2026-10-08, kindmechanized, enforced byapp/tests/test_gate_inventory.py::test_every_door_to_a_gated_answer_carries_the_gate.AGENTS.mdbriefing regenerated withstomata brief --write.Two incidental corrections to the ledger file, both from re-saving through the CLI:
hashed-identifier-inverted-over-a-small-domainhadenforced_bystored as a bare string; the loader split it into one-character list items on every save (visible asa, p, p, /, t, …instomata lesson listonmain). Restored as a one-element list. Below threshold, so no check was affected.noteis kept alongside theupdated_atthe CLI adds.The check
test_gate_inventory.pywalks the mounted routes, selects the ones whose path answers a gated question (field L1 reads, lot members, both trace directions), and reads each handler's source: it must callauthorize_artifactorverify_field_grant, and must not reados.environ/os.getenv, the idiom every flag-shaped bypass has used. An empty inventory fails outright; a leaky stub proves the two findings fire.Five doors are open on
maintoday and listed inOPEN_DOORSwith the PR that closes each. Those entries arexfailand required to still fail: once #19 or #22 merges, this test goes red until the waiver is removed, so a waiver cannot outlive its door. Verified by checking out #22'sfetch_field.pyonto this branch: four waivers flipped to FAILED with the message "the PR has merged: remove it from OPEN_DOORS".The secret-header door (#20) is not caught by this check, since the members route still uses the secret legitimately and the gate there is the ledger write;
test_internal_secret.pyin #20 holds that one directly.harness/bin/stomata run: 12/12, check K now 7/7 recurring lessons mechanized.Merge order
Any. After #19 or #22 merges, remove their entries from
OPEN_DOORSin the same change or the next one; the test will say so.