Repository navigation
catalog, loans — the lock committed, and every uv run refuses a stale one - #33
Merged
Merged
Conversation
Contributor
Author
|
Back to draft: the verifier found that |
Both modules pinned their direct dependencies but not what those pull in: uv.lock was neither committed nor ignored (D34 #10). A page verified at a phone's width is evidence only if the same versions answer in CI and on a workstation. - modules/catalog/uv.lock (57 packages) and modules/loans/uv.lock (21), from uv lock. - Every uv run of the verbs runs --locked: a pyproject.toml changed without its lock is refused, uv naming the fix (uv lock), rather than re-locked silently in CI. Agent-Session: d9d08c03-d66a-408a-b9e2-39932ff3130a Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…Python The verifier's run of the sheet on 3b2e9b5 found what --locked does not cover: - `uv run --locked --with X` resolves X in a layer of its own, outside uv.lock. loans' test and e2e saw 10 and 8 packages the lock does not hold; catalog's test matched its lock by coincidence. The tools move into dependency groups — test in both modules, e2e in loans — resolved in uv.lock, and the verbs run --group. loans' lock: 21 -> 35. - CI ran CPython 3.14.7, the charter says 3.13 (C2). Each module carries a .python-version, uv's convention: without it, uv picks the newest interpreter it has. - catalog's README and two docstrings showed `uv run` without --locked. - Both AGENTS.md name the two traps. Agent-Session: 26f79b64-9fc9-4b2b-9354-485dcc9cda58 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
napkinstack-agent
Bot
force-pushed
the
modules/uv-lock
branch
from
September 19, 2026 18:16
3b2e9b5 to
017f55f
Compare
From the second verification, on 017f55f: - `uv run` adds to an environment and never removes. In CI the verbs share one, so loans' e2e could import what only the test group brings (jsonschema and 4 more), and catalog's test ran on the 55 packages bootstrap installed. test, e2e and bootstrap now run --exact: a verb passes on its own group or not at all. - Both AGENTS.md said a stale pin is refused by every verb: not by check, which runs ruff through uvx and never reads the lock. Agent-Session: 26f79b64-9fc9-4b2b-9354-485dcc9cda58 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
uv run refuses a stale one
From the third verification, on 3d4ff7f: the AGENTS.md traps named the right remedies with the wrong mechanisms. - Without .python-version, uv does not take the newest interpreter it finds: it prefers its managed ones. CI got 3.14.7 because the runner's own Python, 3.12, is below requires-python, so uv downloaded the newest. - An inexact uv run does replace a package locked at another version; what it never removes is an extraneous one. catalog's traps keep the blank line between bullets the list already had. Agent-Session: 26f79b64-9fc9-4b2b-9354-485dcc9cda58 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
napkinstack-admin
approved these changes
Sep 19, 2026
Open
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.
catalog, loans — the lock committed, and every
uv runrefuses a stale onePart of the validation log, #1 (NapkinStack M10h) — D34 #10:
uv.lockneither committed norignored.
Module
modules/catalogandmodules/loans.cross-modulelabel is required, justification belowThe same mechanical fix in both modules, which share the stack of the charter (C2): each
commits the lock
uvalready writes, and runs its verbs against it. Split in two, the secondpull request would repeat the first line for line. No contract is touched.
Deliverable
Out of cycle: D34 #10, a defect of the rehearsal found by NapkinStack M9 — the modules' resolved dependencies are not reproducible; cycle 1 is closed and no cycle is framed after it.
What it changes
Both modules pin their direct dependencies (
==), not what those pull in:starlette,pydantic,anyioand the rest float.uv runwrote auv.lockin each module on everyworkstation, and nobody committed it or ignored it. A page verified at a phone's width is
evidence only if the same versions answer in CI and on a workstation.
modules/catalog/uv.lock(57 packages) andmodules/loans/uv.lock(35), fromuv lock.uv runof the verbs runs--locked(7 of them): apyproject.tomlchanged withoutits lock is refused —
uvnames the fix,uv lock— rather than re-locked in CI and thrownaway with the runner.
--withany more.uv run --locked --with XresolvesXin a layer of itsown, outside the lock, and says nothing. The tools the verbs need are dependency groups,
resolved in
uv.lockwith the rest:testin both modules,e2einloans(catalogalready had one).
test,e2eandbootstraprun--exact.uv runadds to an environment and neverremoves; in CI the verbs share one, so a verb could pass on a package only another group
brings. Now each passes on its own group or not at all.
.python-version,3.13— the charter's Python (C2). Withoutit
uvtakes the newest interpreter it has: CI ran 3.14.7.catalog's README and two docstrings run--locked; bothAGENTS.mdname the three traps.Since the first verification
The sheet was run on
3b2e9b5by a verifier session (dec9b511-…). S1 to S4 passed, andthe run found what they did not ask:
loans'testande2eimported 10 and 8 packages thelock does not hold (
catalog'stestmatched its lock by coincidence of dates), CI's Pythonwas 3.14.7, and three documented commands lacked
--locked. Fixed in017f55f; S5 and S6are the scenarios that would have caught it. The branch was rebased on
951b390(#32) at thesame time.
A second verifier session (
b15a829f-…) passed S1 to S6 on017f55fand noted that in CIloans'e2ecould still import 5 packages only itstestgroup brings — every one locked,but a verb proven green on another group's packages. Fixed in
3d4ff7fwith--exact, withthe wording it also caught:
checknever reads the lock.A third (
645beb1b-…) passed S1 to S6 on3d4ff7fand found the traps inAGENTS.mdnamingthe right remedies with the wrong mechanisms:
uvprefers its managed interpreters ratherthan the newest it finds — CI got 3.14.7 because the runner's own 3.12 is below
requires-python— and an inexactuv rundoes replace a package at another version, itonly never removes an extraneous one. Fixed in
905adfc,AGENTS.mdonly. The sheet belowis the fourth run (
55e90888-…), on905adfc: S1 to S6 passed, notes only.Oracle
the locked versions; a stale lock is refused; every package a verb's interpreter sees
is in the lock, at its version; the interpreter is 3.13
loanschanged withoutuv lock:nstack test loansrefused, "To update the lockfile, runuv lock";on
3b2e9b5,loans'testenvironment saw 10 distributions absent from its lock(
pytest,pluggy,jsonschema,rpds-py…) ande2e8; without.python-version,uv run --python-preference systempicks 3.14.7 on a workstation that has both; in oneenvironment,
loans'e2eafter itstestsaw 33 distributions,jsonschemaamongthem, against the 28 its group prescribes
with
--exact, 28 and nojsonschemaKind of oracle: other: the modules' own verbs, locked; the distributions each verb's interpreter lists (
importlib.metadata) compared withuv.lockReview budget
mass rename…>
Contracts
nstack compatproving itonce the version is consumed or stable
removal date set
Definition of Done
checktestloans' consumer side, in itsteste2e, lockedcatalog's README,app.pyandcontract_double.pyrun
--locked; bothAGENTS.md, Known trapsTest sheet
Verifier: session 55e90888-0b84-49ee-9a6a-76c904784237
Module checksruns, thencatalogpassesbootstrap,check,testande2e, andloans— which declares nobootstrapand installs its browser ine2e— passescheck,testande2e; everyuv runwith--locked, none with--with, andtest,e2eandbootstrapwith--exactModule checkssuccess. It ran on mergedfbbc2b, whose tree31a8a9fis the head's tree. catalog: bootstrap ok, check ok, test 8 passed, e2e 7 passed and 2 subtests passed. loans: "bootstrap not declared", check ok, test 15 passed, e2e (browser install then pytest) 4 passed. All 5 loggeduv runcommand lines have--locked --exact --group …, and none has--with905adfcmodules/loans/pyproject.tomlchanges withoutuv lock, whennstack test loansruns, then it is refused anduvnamesuv lockas the fixhttpx==0.28.1to0.28.0, then ranuvx --from napkinstack==0.4.0 nstack test loans: rc=1,error: The lockfile at uv.lock needs to be updated, but --locked was provided.andhint: To update the lockfile, run uv lock.nstack e2e loanswas refused the same way, as wastest loanswith only thee2egroup's playwright pin changed.nstack check loansstill passes (rc=0).loans/uv.locksha256ff0f7b31…is unchanged andpyproject.tomlwas restored (bfdbcee9…)905adfcuv sync --locked), then every installed version is the one itsuv.lockrecordsUV_PROJECT_ENVIRONMENT=<new dir> uv sync --lockedin each module, once without and once with--all-groups. catalog installed 16 (55 with all groups) and loans 20 (33). I listed each environment's distributions with its own interpreter (importlib.metadata): 0 are missing from the lock, 0 have another version, and the set equals the closure computed fromuv.lock.uv pip freezeequalsuv export --locked --all-groupsexceptcolorama, which is win32 only. CPython 3.13.15905adfcloanslocked, when itstestruns in CI, thencatalogis neither importable nor imported (charter C2.2, unchanged)test-run.json: collected 15, failed 0,catalog_importablefalse,catalog_importedfalse.isolation.json(e2e) is also false/false and recordscatalog_base_url_configuredfalse.modules/loans/uv.lockhas nocatalogpackage905adfccatalog'stestande2e, and ofloans'testande2e, lists the distributions it can import, then each one — the module aside — is in that module'suv.lock, at the version it recordsUV_PROJECT_ENVIRONMENTand ran it throughnstack0.4.0. All passed (catalog test 8, e2e 7 and 2 subtests; loans test 15, e2e 4). Then each environment's interpreter listed its distributions: catalog test 21, catalog e2e 55, loans test 30, loans e2e 28 (and catalog bootstrap 55). In every case 0 are outsideuv.lock, 0 are at another version, and the set is exactly the lock's closure of the project plus that verb's group. Listing from insideuv run --locked --exact --group <g> pythongave the same result. The interpreter was CPython 3.13.15 each time905adfcModule checksruns, then everyuv runofcatalogandloansuses CPython 3.13, the charter's (C2), and not the newest the runner can getDownloading cpython-3.13.15,Using CPython 3.13.15andCreating virtual environment at: .venv. Neither job selects another interpreter or re-creates.venv. For contrast, before the pin run 35453717121 (3b2e9b5) downloaded and used CPython 3.14.7; the runner's own Python is 3.12.3905adfcSummary
DONE
uv runof their verbs--locked, none--with;test,e2eandbootstrap--exact..python-version3.13 in each module; thedocumented commands locked; the two traps in both
AGENTS.md.VERIFIED
nstack0.4.0, in CI's order and one environment per module as CI has:catalogbootstrap, check,
test8 passed ("Uninstalled 34 packages", thee2egroup's),e2e7 passed and 2 subtests;
loanscheck,test15 passed,e2e4 passed ("Uninstalled 5packages", the
testgroup's); "Using CPython 3.13.15"; both locks unchanged.loans'testgroup this time; the lock's SHA-256 unchanged.loans'test-run.json: 15 collected, 0 failed,catalog_importablefalse,catalog_importedfalse.nstack fitnesscompliant;nstack pr-scope: 2 modules (P1 →cross-module), 75/400lines, 11/15 files. The project's hooks; gitleaks over the branch's commits; one author,
napkinstack-agent[bot], each commit with itsAgent-Session:trailer — two authorsessions,
d9d08c03-…and26f79b64-…, over four commits; gitleaks over the wholehistory in CI.
3b2e9b5: CI'suv(0.12.17) reads a lock written by 0.12.14.ASSUMED
NOT VERIFIED
uv run --lockedwrappers ofcatalog's two documented startcommands (README). The scenarios start the same invocation from the
e2einterpreter, andCI never runs the
runverb. Run by hand by the fourth verifier on905adfc:GET /200,the double's
GET /tools200. The README's checked on every run predates this pullrequest; reported to the log.
RISKS
pyproject.tomlanduv.lock: the price of thesame versions everywhere.
--lockedmakes CI depend onuv's version, whichsetup-uvdoes not pin (the latest,0.12.17; the locks were written by 0.12.14): a
uvrelease that writes locks differentlywould turn both modules red with no change here. The workflow is NapkinStack's; reported
to its register rather than patched in this project.
alone and an identifier it generated; T2 compares names and cannot see that link. The
approver decides whether that is independent enough — as on NapkinStack v0.3.1 -> v0.4.0, and the contracts module's check and test #31.
contracts'testrunsuvx --from pytest==9.1.1 --with …— the same unlocked layer, with no project of its own to lock.catalog'srunverb is--lockedbut not--exact, so on a workstation it inherits whatever group ran last (the page runs on itsown 16 packages in a fresh environment);
loans'testrecordscatalog_importablebutdoes not fail on it — the hard assertion is in its
e2e, and S4 reads the record.Signals to report
--lockedand no--within amodule's
uv runverbs is checked by nobody; the sheet's S5 is its manual form🤖 Generated with Claude Code