Skip to content

S3 (#184) — finish #158's rename, fix the URL it broke, and ban the retired name - #195

Merged
Polichinel merged 1 commit into
developmentfrom
feat/s3-seam-contract-rename
Aug 2, 2026
Merged

Polichinel merged 1 commit into
developmentfrom
feat/s3-seam-contract-rename

Conversation

@Polichinel

Copy link
Copy Markdown
Collaborator

Closes #184. Finishes #158. Part of epic #181.

What #158 actually left behind

It was closed on 2026-08-01 as "cosmetic, non-blocking". It was neither.

Four citations survived in .py. The one that mattered sits inside the message raised by appwrite_env.assert_env_declared — what an operator reads when a delivery refuses to launch, pointing them at a retired contract name in a repo they do not own, on the day their run failed.

And the rename broke a URL. It was applied as a blanket find-and-replace, which rewrote the filename inside the link in ADR-013 §7d:

.../docs/ADRs/platform/the Appwrite Seam Contract_identity_secrets_configuration_contract.md

A path containing spaces. It has never resolved. The upstream file has since been renamed to appwrite_seam_contract.md independently, so the link was wrong twice over.

Both §7d links now pinned

/blob/main/ → /blob/b54928f/. §7d claimed "referenced by URL, never by copy" — true in letter, false in effect while an unpinned link drifts underneath it. It did drift: the registry moved 1.3.0 → 1.4.0 on 2026-08-02, the same day.

Recorded as Erratum E2 in the post-adoption record, matching E1's shape. contract_version stays 1.5; no wire artifact touched.

The ban

test_the_retired_contract_name_is_gone_from_code scans the package, the tests, and scripts/, reports file:line, and excludes docs/ADRs and reports/ — an ADR describing a 2026-07 decision correctly says what the thing was called in 2026-07. Code has no such excuse.

Review findings — all five addressed

F1 (warning) — the ban scanned two of three code roots. scripts/build_gaul_lookup.py (builds the committed GAUL artifact) and scripts/build_wire_fixture.py (generates the §10 fixture) were unguarded. Clean today, so it passed — which is exactly register C-74's defect, registered ninety minutes earlier: a guard whose declared scope exceeds its actual scan. Committing it again inside the epic that exists to close it would have been indefensible. Widened, and re-mutation-tested at the new width:

['scripts/build_gaul_lookup.py:1']

F2 — the module's pinned URL now names the version (v1.4.0), matching §7d. A pinned URL does not rot but it does go stale; the version is what makes that legible.

F3 — test_secret_env_names_follow_the_platform_naming_rule → ..._the_seam_contract_naming_rule. The comment had been corrected; the function name still echoed the retired contract.

F4 — Erratum E2 added to the post-adoption record, so the change appears in the changelog rather than only inline at §7d.

F5 — self-exclusion now compares resolved paths, not basenames.

Caught mid-story

The ban test failed on my own docstring — a parenthetical I had just written into appwrite_env.py naming the retired contract in order to explain its retirement. Removed. That explanation belongs in the ADR, which now carries it.

Forward note for S6 (#187)

The registry is v1.4.0 as of today (amended = "2026-08-02", contract §5.9). #187's body specifies SEAM_CONTRACT_VERSION = "1.3.0" and is stale before it is written. b54928f now appears in two files that must move together — making that pair checkable is precisely S6's job.

Verification

ruff check .                                                    # clean
pytest -q                                                       # 313 passed, 44 xfailed, 5 known pyarrow (C-72)
grep -rn "PLATFORM-001" --include=*.py views_postprocessing/ scripts/ tests/   # 0 (excl. the banning file)
grep -rnoE "https://github\.com/[^)]*" docs/ | grep " "         # 0 — no space-bearing URLs
grep -rn "views-appwrite/blob/main" docs/                       # 0 — all pinned
git diff --stat origin/main -- tests/fixtures/                  # empty

Both pinned targets verified present in the views-appwrite checkout, and b54928f confirmed a real commit there.

🤖 Generated with Claude Code

… ban the retired name

#158 renamed the cross-repo contract from PLATFORM-001 to "the Appwrite Seam
Contract" and was closed on 2026-08-01. Only the documentation half landed, and
the half that did land was applied as a blanket find-and-replace.

Four citations survived in .py. The one that mattered was inside the message
raised by appwrite_env.assert_env_declared — the text an operator reads when a
delivery refuses to launch, naming a retired contract in a repo they do not own,
on the day their run failed.

Worse, the find-and-replace rewrote the FILENAME INSIDE A URL. ADR-013 §7d
pointed at ".../platform/the Appwrite Seam Contract_identity_secrets_
configuration_contract.md" — a path containing spaces, which has never resolved.
The upstream file has since been renamed to appwrite_seam_contract.md
independently.

Both §7d links now point at views-appwrite b54928f rather than main. §7d claimed
"referenced by URL, never by copy", which was true in letter and false in effect
while an unpinned link could drift under it — and it did: the registry moved
1.3.0 to 1.4.0 on 2026-08-02, the same day. Recorded as Erratum E2 in the
post-adoption record; contract_version stays 1.5 and the wire is untouched.

The ban test is what stops this returning. Scoped to code — the package, the
tests, AND scripts/ — because docs/ADRs and reports/ legitimately name the old
contract when narrating what was decided under it. An ADR describing a 2026-07
decision correctly says what the thing was called in 2026-07; code speaks in the
present tense to whoever reads it now.

Review widened that scan from two roots to three. Two roots would have been
register C-74's defect committed again, ninety minutes after registering it: a
guard whose declared scope exceeds its actual scan, passing because the unscanned
part happens to be clean. Mutation-tested at both widths.

The ban also caught a parenthetical I had just written into appwrite_env.py's
docstring naming the retired name to explain its retirement. Removed; that
explanation belongs in the ADR, which now carries it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Polichinel
Polichinel merged commit 4e31009 into development Aug 2, 2026
4 checks passed
@Polichinel
Polichinel deleted the feat/s3-seam-contract-rename branch August 2, 2026 00:17
Polichinel added a commit that referenced this pull request Aug 2, 2026
…as an unmerged branch (#198)

S3 (#184/#195) pinned the Appwrite Seam Contract at a commit resolved with
`git -C ../views-appwrite rev-parse HEAD`. That checkout was sitting on the
unmerged `feat/s1-single-writer-rule` branch, so the pin captured a commit that
never reached `main` and has now been withdrawn (views-appwrite #30, #27). It
declared registry v1.4.0; main carries the ratified v1.3.0.

Verified before repinning, not taken on the issue's word: the withdrawn commit is
reachable only from that feature branch, 47172af is origin/main's tip, its
registry declares version = "1.3.0" (RATIFIED — þing-02), and both cited files
exist at it.

Four references repointed — appwrite_env.py's docstring and ADR-013 §7d's two
links — plus the version labels, the §7d correction paragraph, and Erratum E2,
all of which asserted a 1.3.0 -> 1.4.0 move that never landed.

The withdrawn sha is deliberately not repeated anywhere, including in the prose
narrating its withdrawal, so that grepping for it finds nothing. #196's
acceptance criteria are met literally.

The lesson is narrow and now recorded in both places a future contributor will
look: resolve a cross-repo pin from the tip of the other repo's main, never from
whatever its working copy has checked out. A pin is a claim about what the
contract says; HEAD answers a different question — what someone was working on.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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