Repository navigation
docs: C-126 gains the other end of the rotation blind spot (views-appwrite C-27) - #372
Merged
Merged
Conversation
…write C-27) Raised by the views-models session on 2026-11-29 after it reproduced the shape in its own loader: a validator that checks a name is EXPORTED cannot see which VALUE it carries, so a function sourcing a dotenv file to read one variable silently replaced a freshly rotated APPWRITE_DATASTORE_API_KEY with the stale value the file still held (their PR #758, then #760). Nothing in this package can acquire that shape — verified, not assumed: test_env_declaration.py::test_the_dotenv_borrow_is_dead enforces the #134 removal by AST parse rather than grep and passes; exactly four modules read the environment, all os.getenv on one name at a time; and no tracked .py or .sh here is hidden from a search by .gitignore. What C-126 was missing is where the design task lives. The owning entry is views-appwrite C-27 (rotation has no propagation mechanism, open); the Appwrite Seam Contract §9 O1 owns the design and views-appwrite#9 owns the issue; the inventory is docs/ADRs/platform/key_inventory_and_rotation.md, read at bf39b3c. That commit sits on an unmerged branch, so the entry says the pin may move and to re-resolve rather than trust it. The peer cited O1 as belonging to that document. It does not — it is a Seam Contract section the document references. Cited correctly here rather than as relayed, and the foreign C-27 is namespaced per this register's convention. Also records what that document settles so this entry does not re-open it: it is not a rotation mechanism, and it names this repository's test_credential_expiry.py as already correct, calling a second tripwire "building the wrong thing to feel busy". So the expiry remedy stays C-84's date on a calendar, now agreed across two repositories. No code change. Suite unchanged: 654 passed, 3 skipped, 41 xfailed, 1 pre-existing failure (the poetry.lock drift, views-models#757). Ruff clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ANY1CCy9Xo7zjMY4XJ69v9
…carry it Sharpened after the views-models session gave the precise location. Verified in the local views-appwrite checkout rather than relayed: - the hazard is §3.1, "Sourcing a dotenv file to read one name silently reinstates every other name in it" — confirmed present at the pinned commit - the pin moves bf39b3c -> 419b6e9, the current head of that branch - the branch is the head of views-appwrite PR #217, OPEN against development, so the entry now names the PR as the durable handle and says both the commit and the section number may move Two citation corrections, both in the direction of claiming less: - the rule "assert the value that arrives, not that a name exists" appears in NO FILE at 419b6e9. It is that commit's subject line. Cited as a commit subject, because quoting it as a document rule would be inventing a citation. - the "four independent instances of one shape" count is marked relayed rather than checked. This register has measured two: its own assert_env_declared and views-models' loader. No code change. Suite unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ANY1CCy9Xo7zjMY4XJ69v9
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.
No code change. One amendment to register entry C-126, prompted by the views-models session during the #368 exchange.
What was missing
C-126 records that the audience connection cannot be rehearsed without arming a real delivery. It did not record the related gap that no guard on either side of the seam can close: nothing here can tell a current key from a stale, well-formed, distinct one.
appwrite_env.assert_env_declaredchecks a name resolves to something truthy and deliberately never reads the value — that is what lets it name the missing variables in an ERROR log when the tuple it was handed carries a secret slot.contract/audience.assert_audience_is_not_the_shelfis the value-level complement, and the only thing it can establish is that the audience key differs from the shelf key.A rotated-but-wrong key passes both. The first signal is a 401 after the contract resolution, every manifest download and the 888 KB GAUL lookup.
Why now
The views-models session reproduced the same blind spot in its own loader and told us, because the mechanism is not specific to them: their validator checked that a name was exported, so a function that sourced a dotenv file to read one variable silently replaced a freshly rotated
APPWRITE_DATASTORE_API_KEYwith the stale value the file still held — exit 0, no warning (their PR #758, then #760).Nothing in this package can acquire that shape. Verified, not assumed:
tests/test_env_declaration.py::test_the_dotenv_borrow_is_deadenforces the [þing-01] Kill the implicit ensemble-dotenv borrow; entry validation per D6 #134 removal by AST parse rather than grep — it catches an import ofdotenvor a call toload_dotenv/find_dotenv/dotenv_valuesanywhere in the package. Passes ondevelopment.os.getenvon one name at a time: the twoappwrite_env.pyand the two managers..pyor.shin this repository is matched by.gitignore, so the search above was not blind. (The shell'sgrephonours.gitignoreeven for tracked files, which is why this was checked explicitly.)What the amendment adds
Where the design task actually lives, so the next reader finds it instead of re-deriving the problem:
O1docs/ADRs/platform/key_inventory_and_rotation.md, read atbf39b3cThe pin may move and the entry says so.
bf39b3cis on the branchdocs/handover-and-literature-closeand is not merged, so the entry instructs the reader to re-resolve it rather than trust it.The relayed identifier was wrong and is corrected here rather than repeated. The peer cited
O1as belonging to that document. It does not —O1is a Seam Contract section which the document references, at its §7. Checked in the local views-appwrite checkout before citing. The foreignC-27is namespaced per this register's own convention, which exists because a bareC-27sends a reader searching this file for an entry that is not in it.What it also records, to stop the entry re-opening a settled question
That document's §7 states two things this register should not relitigate:
tests/test_credential_expiry.pyas already correct — firing 30 days before the earliest expiry, with an acknowledgement escape so it cannot hold the merge queue hostage — and says a second tripwire there would be "building the wrong thing to feel busy".So the remedy for the expiry half stays C-84's date on a calendar rather than a validity preflight, and that verdict is now agreed across two repositories rather than asserted in one.
Verification
Suite on the supported interpreter (3.11.15): 654 passed, 3 skipped, 41 xfailed, identical to before this change, plus the one pre-existing failure — the
poetry.lockdrift tracked as views-models#757. Ruff clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01ANY1CCy9Xo7zjMY4XJ69v9