Repository navigation
PRODUCE-PY P1: the wrapper's core (typedstandards#135) - #1
Merged
Merged
Conversation
pyproject.toml (hatchling, requires-python >=3.11, httpx and PyYAML declared for P2), uv.lock, and package.json with package-lock.json pinning @typedstandards/cli 0.2.0 exactly. hatch_build.py runs npm ci --omit=dev --ignore-scripts at every wheel build, standard or editable, and ships the tree with each package's licence inside the wheel. The package runs the vendored entry file with node on PATH and returns the CLI's stdout parsed as JSON: sign, withdraw, attest, view and verify. Not yet: the Node floor and override, the exit-code mapping (every non-zero exit raises the base CliError), and verify's trustRegistry drop (D9). Fixtures: verbatim copies of typedstandards' reference golden (116882a) and the host template's served bundle (70bfd18); tests/fixtures/README.md gives their provenance. .gitleaks.toml is the template's did:key allow rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ru4PYga7Zf8HANgotZKs4u Signed-off-by: Nathan Storey <npstorey@users.noreply.github.com>
Golden replay of the 9 envelope cases and the withdraws case; the static and run-time guards (no seed variable, no env=, no digest module outside P2's pin); the Node locator; exits 1-4; CLI_VERSION; D9's trustRegistry drop; the five pass-throughs end to end. Red at this commit, by design: the Node floor and override, the exit-code mapping and the D9 drop are not implemented, so their tests fail at their assertions. Every module imports and every test collects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ru4PYga7Zf8HANgotZKs4u Signed-off-by: Nathan Storey <npstorey@users.noreply.github.com>
The locator tries TYPEDSTANDARDS_NODE, then node on PATH, reads node --version, and raises NodeLocatorError naming 20.19 and the override when no Node is found or the one found is below 20.19.0. Exits 1-4 raise VerificationError, UsageError, SeedError and InternalError, which share the base CliError and carry the exit code and the CLI's stderr; VerificationError also carries the verdict verify prints before exiting 1. An unmapped code raises the base. On exit 0, the CLI's stderr (attention readings) is logged at INFO on the typedstandards logger. verify drops a top-level trustRegistry from a bundle and changes nothing else (G0 D9 = A, typedstandards#136); the workaround goes when the wrapper pins a CLI that accepts the key. Two tests are corrected here: the malformed-seed case now sends a valid withdraw input (the CLI checks the input before the seed), and the logging case drives attest, whose key_unbound reading is printed with exit 0 (a self-certifying sign prints nothing on stderr). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ru4PYga7Zf8HANgotZKs4u Signed-off-by: Nathan Storey <npstorey@users.noreply.github.com>
A failing assertion's repr printed the recorded environment, which in a developer's shell or on a CI runner can hold real secrets. The run-time guards now fail with pytest.fail and name only argv and the keys that changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ru4PYga7Zf8HANgotZKs4u Signed-off-by: Nathan Storey <npstorey@users.noreply.github.com>
ci.yml: test on Python 3.11, 3.12 and 3.14 x ubuntu-24.04 and macos-15 on Node 24, plus ubuntu-24.04, 3.12, Node 22; lint; and a wheel job that builds the sdist and the wheel from it, installs the wheel into a fresh environment and runs scripts/smoke_wheel.py there. Actions pinned to commit SHAs measured with git ls-remote; permissions: contents: read. README: install and use, both Node floors, the key path, the D9 behaviour with typedstandards#136, Windows untested. CLAUDE.md: this repository's rules. .claude/agents/impl.md and cold-read.md adapted from typedstandards', each pinning effort: high and naming this repository's checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ru4PYga7Zf8HANgotZKs4u Signed-off-by: Nathan Storey <npstorey@users.noreply.github.com>
Both are declared for P2's helpers; P1 imports neither at module load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ru4PYga7Zf8HANgotZKs4u Signed-off-by: Nathan Storey <npstorey@users.noreply.github.com>
Owner
Author
|
GO — CAT PLAN (the program seat), bound to head Read from GitHub and disk, 2026-10-03:
The owner merges with Also relayed by the owner on the seat's advice, to be recorded by the ORCH at its next gate: a short Fable cold read of P1 and P2 runs ahead of P2r, so 0.1.0 publishes after it. |
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.
PRODUCE-PY phase P1 (npstorey/typedstandards#135; G0 record, comment 5970267273). This PR adds the
core of
typedstandards, a thin Python package that runs@typedstandards/cli0.2.0 as a childprocess. The package holds no key, reads no seed, and computes none of the format's hashes.
Branch
ts135/p1-core, headbb8c37d1e7f860e46b8fac888e6a78adb60ddccb, 6 commits on66d44c0.33 files changed, 3740 insertions. Blast zone: this repository, this branch only. typedstandards
(
116882a) and the host template (70bfd18) were read withgit showand not changed.What lands
pyproject.toml(hatchling 1.32.4,requires-python >=3.11, runtime dependencieshttpxandPyYAMLdeclared for P2 and not imported),uv.lock,README.md,CHANGELOG.md(
## Unreleased),CLAUDE.md,.claude/agents/impl.mdandcold-read.md(eacheffort: high),.gitleaks.toml(the template'sdid:keyallow rule),.github/workflows/ci.yml.package.jsonandpackage-lock.jsonpin@typedstandards/cli0.2.0 exactly.
hatch_build.pyrunsnpm ci --omit=dev --ignore-scriptsat every wheel build,standard or editable, drops npm's
.binsymlinks, checks that each of the 6 packages carries alicence file, and ships the tree in the wheel (232 entries under
_vendor/node_modules/; thesdist carries none).
uv syncruns the same hook, so tests drive the tree a wheel ships.TYPEDSTANDARDS_NODE, thennodeonPATH;node --versionmust be atleast 20.19.0. Otherwise
NodeLocatorError, whose message names20.19andTYPEDSTANDARDS_NODE.sign,withdraw,attest,view,verify. Each returns the CLI'sstdout parsed as JSON. A mapping input goes on stdin (
--input -); astrorPathLikeis apath.
viewwrites mappings to temporary files and removes them before it returns.verifypasses
--jsonunlessfull=False.verifydrops a top-leveltrustRegistryfrom a bundle (a document withpackageHash) before the CLI sees it, and changes nothing else (typedstandards#136).VerificationError(with.document, the verdictverifyprints),UsageError,SeedErrorandInternalError, underCliError(exit_code,stderr,command). Any other code raises the base class.CLI_VERSION = "0.2.0",cli_version(), and__version__ = "0.1.0.dev0".Acceptance
withdraws; serializedJson, contentHashSha256, envelopeHash or nodeId; TEST 1 seed for the self-certified case; fixture SHA-256 pinnedenvelopeHashchanged by one hex digit: 3 failed (the pinned SHA, the replay, the path replay)env=, nohashlib: AST scans plus run-time captureenv=added to the runner (static and run time fail); a concatenated seed-name read in the locator (only the run-time guard fails)v20.18.0stub,v20.19.0stub9744147(no locator) and the floor comparison removed: 4 failed9744147, and the mapping removed: 5 failedCLI_VERSIONequals the vendored--versionandpackage.json; D9 over the template's bundleCLI_VERSION = "0.2.1": 4 failed; the drop removed: 2 failed with the CLI's exit 2CliNotVendoredErrorsmoke check passedLocally, at the head: 75 passed on Python 3.11.15, 3.12.13 and 3.14.6 with Node 24.21.0, and on
3.12.13 with Node 22.23.1;
ruff checkandruff format --checkclean. The clean-checkout buildgave the same artifact hashes twice:
CI runs only after the push, so this PR's runner results are read at the gate. Each criterion's
red and green were driven locally; the table above summarizes those transcripts.
CI checks, by name (for the ruleset)
test (py3.11, ubuntu-24.04, node 24)test (py3.12, ubuntu-24.04, node 24)test (py3.14, ubuntu-24.04, node 24)test (py3.11, macos-15, node 24)test (py3.12, macos-15, node 24)test (py3.14, macos-15, node 24)test (py3.12, ubuntu-24.04, node 22)lintwheel (build, install, smoke)Fixture provenance
tests/fixtures/reference-golden.jsonpackages/produce-core/src/__fixtures__/reference-golden.json116882a, last changedea75a1dd2bcfc2bc017b07502b3b00c3aa16de402df134128a374b4582650b79fb501c1test_golden.py::test_fixture_is_the_pinned_copy; each case assertsserializedJsonbyte for bytetests/fixtures/first-note.bundle.jsondocs/bundles/first-note.bundle.json70bfd18, last changed26dff9bcb11d2a229c9695db6c7f4d6c9349ccee14f14af6c39844886480699ba2401batest_d9.py::test_fixture_is_the_pinned_copyNotes for review
key_unbound) is logged at INFO on thetypedstandardslogger rather than dropped.pytest.failand name only argv and changed keys, so afailing run never prints environment values.
git log --format='%h %G? %s%n%(trailers:key=Signed-off-by)' main..HEAD: six commits, eachG,each with one
Signed-off-by: Nathan Storey <npstorey@users.noreply.github.com>equal to itsauthor email.
main..HEAD: 6 commits scanned, no leaks found.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ru4PYga7Zf8HANgotZKs4u