Repository navigation
Description
Outcome and current gap
Turn the shipped local package API into a usable terminal workflow without changing its security or reproducibility contract. At the reviewed baseline, compile_package accepts explicit manifest/lock paths; RFC 0066 explicitly defers package CLI tooling. This issue covers CLI orchestration, not new language semantics, registry resolution or automatic pin repair.
Contract to freeze first
Add a coherent nano package command group, with explicit --manifest and --lock on every build operation:
-
check: validate the closed input snapshot and emit text or one versioned JSON diagnostic document. -
build: emit the existing package envelope and validated module, preserving packageHash/moduleHash/sourceMap meanings. -
test --cases PATH: execute a strict, versioned, local fixture file using the existing VM and supplied frames. Cases assert proposed intents/diagnostics, never execute them. Only deterministic pure/intent test fixtures are admitted; inference and provider/effect handlers fail before execution. -
Optional
init --directory PATHis a separate later PR: create a minimal example only in a new/empty destination, refuse overwrite, and never discover or rewrite existing project pins.
Choose exact arguments, fixture schema, output framing and exit meanings in a short design document before editing shared CLI dispatch. Reuse existing exit-code conventions where possible; distinguish invalid source, invalid invocation and I/O failure. JSON stdout must contain one parseable document; progress/errors use stderr. Binary artifact output must preserve exact canonical bytes on Windows and Linux.
Implementation slices and file ownership
First PR: check/build dispatch, help, focused CLI tests and documentation. Second PR: strict fixture runner and negative controls. Keep compiler/package semantics in their existing owner lane; use its public API. Expected starting surfaces: nano/cli/main.py, nano/cli/commands.py, nano/compiler/package.py, tests/test_package.py, tests/test_cli.py and examples/agent-package/. New package CLI implementation/test modules are preferred over enlarging unrelated commands. Formatting is deferred because byte pins make silent rewrites consequential.
Required acceptance matrix
- The checked-in agent-package example builds through CLI and API with byte-identical canonical envelope and executable hashes, including source-map provenance.
- Running from another working directory, relocating the project, JSON metadata reordering, Windows/LF output framing and two repeated builds preserve the documented identities.
- Missing/stale pins, duplicate keys/symbols, wrong types, import/call cycles, ungranted effects and resource-limit violations return stable positioned diagnostics and nonzero exit codes.
- Absolute/escaping/symlink-escaping paths and ambient module discovery remain rejected. No network, model, QPU or ambient credentials are read.
- Read-only commands leave all source/manifest/lock bytes unchanged. No automatic refresh, parent search or hidden writes.
- Fixture tests distinguish an emitted intent from an executed action; malformed cases, unsupported handlers, mismatched expectations and all-skipped/empty case sets fail explicitly.
- Existing single-source
nano check/compile, baseline v0.1.0 and v1 fixtures remain unchanged. - A clean installed-wheel environment can reproduce the documented example outside the repository, with no optional quantum dependencies.
Dependencies: shipped #66 only; immutable-record work may proceed separately and is not required. This lane owns CLI dispatch; a concurrent host-client lane must not edit it. Packaging/release conformance consumes the stable commands after their contract is frozen.
Hillclimb protocol and evidence
Start from a clean, isolated branch and record the actual base SHA; the reviewed baseline is Nano cb6ea884d63dcaa8cc0e7c0b952bb88784e8219f (source). Rebase and recheck if main has advanced. Link this issue to roadmap #67. Before editing, freeze the contract/fixture hashes, reproduce the specific missing behavior, and record a passing adjacent compatibility control. A missing feature is an expected rejection, not an invented production incident.
Use at most three candidate iterations against the frozen development set. Log each hypothesis, minimal diff, command, seed/environment, result and regression delta. Keep any held-out set immutable and report its final evaluation separately; do not tune against it. Stop and report an unresolved failure or dependency rather than weakening validation, increasing caps, deleting a negative control or relabelling skips as passes.
Deliver small reviewable PRs with exact head/base SHAs, commands, pass/fail/skip denominators, fixture/artifact hashes and limitations. Coordinate shared schemas before implementation; only one lane edits each shared contract at a time. Preserve baseline/Intent/executable/package/quantum schema identities independently. Issue creation is planning authorization, not permission to launch agents, merge, deploy, spend or change runner/security/credential settings. Tests are offline, fake-provider or local simulator only. CI startup failure with zero jobs remains a failure; any later merge exception needs its own applicable authority. The prior local-test waiver covered only PRs #82/#188/#460.
Dependencies and lane boundary
Independent on the shipped scalar package API. Coordinate #85 through that API; do not wait for records or edit compiler internals for convenience. #88 consumes the resulting installed-wheel commands. This lane owns shared package CLI dispatch. #86 owns a separate TypeScript directory, and #87 owns benchmark fixtures.
Activity
AetherAI3 commentedon Nov 7, 2026
Hillclimb goal and frozen contract (lane owner: package CLI dispatch)
Goal:
nano package check | build | testwith required--manifest/--lock, thin over the shippedcompile_packageAPI and existing v1 VM, satisfying every row of this issue's acceptance matrix.initand formatting stay deferred.Base:
cb6ea884d63dcaa8cc0e7c0b952bb88784e8219f(= reviewed baseline; main has not advanced). Linked to roadmap #67.Frozen before any dispatch edit — commit
2a60d083e9fd071529782283e30fe965b6a83ec1onclaude/nano84-package-cli:docs/package-cli.md(args, exit codes, framing, check/test JSON documents, fixture schema 1.0.0)43e460dfb184550502818394c1f9cc9304667ae07a0e8c2904532f8ec81cab74examples/agent-package/cases.json(frozen dev set: 4 intent cases + 1 runtime rejection)3c97ba8013349787991f445fc60a657db29c38b1c6b8f2255ac27482b0bf2abdBaseline API identity of the checked-in example (CLI must reproduce byte-for-byte):
packageHash sha256:b5f5a854e33c94f48697be3b0e3f9fa2be5a3c5cd198e8556b66b9a4925da099,moduleHash sha256:78031edfa42c22e8d432af57bafa3a455da61b968b75ae8982994896d021200e.Missing behaviour reproduced (expected rejection, not an incident):
python -m nano.cli package check --manifest examples/agent-package/nano.json --lock examples/agent-package/nano.lock→ exit 2,invalid choice: 'package'.Adjacent compatibility control at base (test_package, test_cli, test_compiler_diagnostics, test_examples, test_docs, test_conformance, test_acceptance_parity): py3.12 and py3.13 → 241 passed, 1 skipped, 1 failed (pre-existing).
Pre-existing findings outside this lane (reported, not fixed here):
tests/test_package.py::test_metadata_depth_is_positionedfails on Python ≥3.12:json.loads("["*2000 + "]"*2000)no longer raisesRecursionError(it does on 3.10/3.11), so the lock is rejected asunsupported lock formatinstead ofmetadata depth budget. CI matrix includes 3.12/3.13. Owner: compiler/package lane.cb6ea88(run 41330855596) started zero jobs: "The job was not started because your account is locked due to a billing issue." Per this issue, zero-job CI is a failure; no runner/billing settings will be changed by this lane.Slices: PR1 check/build + dispatch + tests/docs; PR2 strict fixture runner (
nano/cli/package_cases.py) +testwiring + negative controls. Max 3 candidate iterations each against the frozen dev set; held-out evaluation = clean installed-wheel reproduction outside the repo (+ Python 3.10), reported separately.feat(cli): add nano package check and build (#84)
fix(cli): restore earlier outputs when a later package output fails
Merge pull request #89 from AetherAI3/claude/nano84-package-cli
Merge pull request #90 from AetherAI3/claude/nano84-package-cases
AetherAI3 commentedon Nov 7, 2026
Closed with evidence: #89 + #90 merged
Main:
27e8a5f8d502f2c25cfa2b899de62871a63edc86. Its treebe01a4c6…is identical to the tested headf8446421, so every result below applies to main unchanged. Base wascb6ea884….sha256:b5f5a854…a099, moduleHashsha256:78031edf…200e, envelope sha2563a1bae4e…1070.tests/test_package_cli.py, including fresh-interpreter byte checks).actionsExecuted: 0,provider=Noneasserted. Handlers are refused with arun_modulecall count of 0. No skip field exists, so an all-skipped run cannot happen.--no-deps, qiskit and numpy absent. check, build and test 5/5 reproduce the same hashes and bytes.Denominators
Frozen inputs:
docs/package-cli.mdsha25643e460df…cab74;cases.json3c97ba80…2abd, unchanged since freeze commit2a60d08.Review: an independent review found 3 confirmed defects, all fixed with RED then GREEN tests:
A 4th, a suspected symlinked-manifest gap, is unreachable and explained in #89.
Still open, outside this lane:
tests/test_package.py::test_metadata_depth_is_positionedfails on Python ≥3.12 (JSON nesting depth no longer raises RecursionError). It needs the compiler/package owner.test_qsearch_j6_a2_backends.py[ibm_kingston]and[ibm_marrakesh]fail at base in this environment (qsearch lane).Deferred by design:
nano package init, formatting.fix(cli): close init partial-file, traceback and swap gaps
docs: freeze nano package init contract (#84 follow-up)
feat(cli): add nano package init for a pinned example scaffold (#84)
fix(cli): close init partial-file, traceback and swap gaps
fix(cli): avoid dynamic module attribute access in init link check
docs: freeze nano package init contract (#84 follow-up)
feat(cli): add nano package init for a pinned example scaffold (#84)
fix(cli): close init partial-file, traceback and swap gaps
fix(cli): avoid dynamic module attribute access in init link check
docs: freeze nano package init contract (#84 follow-up)
feat(cli): add nano package init for a pinned example scaffold (#84)
fix(cli): close init partial-file, traceback and swap gaps
fix(cli): avoid dynamic module attribute access in init link check
Merge pull request #95 from AetherAI3/claude/nano84-package-init
AetherAI3 commentedon Nov 8, 2026
Follow-up landed:
nano package init(#95)Main:
4307f4bd5548267e52db41155f02ad4fdbcb2518. Its tree7461331e…is identical to the merge preview tested locally, which was #95 head80593f3merged with4b57316.docs/package-cli.mdinit section, commit9671ce6(rebased form of1883bb5)55240f4(contribution shape, package, test 3.10–3.13). It also caught a real determinism-guard violation (getattr(stat, …)) at03b9368, which was fixed.80593f3)b5f5a854…, scaffold16bfedd0….80593f3ibm_kingston/ibm_marrakeshtests, which fail on main in this environment.16bfedd0…, test 2/2, 0 CR bytesMerge: the self-hosted runner was stopped because its host disk was full, so CI could not re-run on
80593f3. The repo owner authorized merging #95 on local evidence in-session. Merged with--admin --match-head-commit 80593f3.Remaining by design: formatting (
fmt) stays deferred, because byte pins make silent rewrites consequential.