Commit Graph

594 Commits

Author SHA1 Message Date
CIAgent Orchestrator fa789d703a docs(P04): complete operator-guide-reference-tracking phase (REQ-OPS-GUIDE, v1.28.4)
Nova Slides Render / render (push) Failing after 29s
---ci---
project: acdl
phase: 4
milestone: v1.29
status: complete
---/ci---
v1.28.4
2026-08-20 05:24:26 +00:00
CIAgent Orchestrator 8c0c2dd268 docs(P03): complete cfn-archive-tf-delegation phase (REQ-369, v1.28.3)
Nova Slides Render / render (push) Failing after 25s
---ci---
project: acdl
phase: 3
milestone: v1.29
status: complete
---/ci---
v1.28.3
2026-08-20 05:20:43 +00:00
CIAgent Orchestrator c19cc68d15 docs(P02): complete gitea-scrub-decisions phase (REQ-367, REQ-368, v1.28.2)
Nova Slides Render / render (push) Failing after 14m19s
---ci---
project: acdl
phase: 2
milestone: v1.29
status: complete
---/ci---
v1.28.2
2026-08-20 05:16:53 +00:00
CIAgent Orchestrator d247db3569 docs(P01): complete publish-pipeline phase (REQ-354, v1.28.1)
Nova Slides Render / render (push) Failing after 24s
---ci---
project: acdl
phase: 1
milestone: v1.29
status: complete
---/ci---
v1.28.1 v1.29.0
2026-08-20 05:07:30 +00:00
CIAgent Orchestrator 09253bf0be docs(ship): P0 complete -> v1.28.0 (local-only, push credentials unavailable)
---ci---
project: acdl
phase: 0
milestone: v1.29
status: complete
escalation: release_pending
resolution: auto
type: release_pending
---/ci---
2026-08-20 05:00:48 +00:00
CIAgent Orchestrator 0789c27ca2 docs(P00): complete v1.29 pre-execution — SPECIFY+CLARIFY+RESEARCH+PLAN+GRILL+MVP/UX
Nova Slides Render / render (push) Failing after 14m27s
---ci---
project: acdl
phase: 0
milestone: v1.29
status: complete
---/ci---
v1.28.0
2026-08-20 05:00:35 +00:00
Jon Chery 184f33c60a merge(chore): PDLC Phase 0 state intake — post-v1.28 ground truth snapshot
acdl-ci / Test (push) Failing after 23s
acdl-ci / Platform check-only (offline) (push) Successful in 24s
acdl-ci / Lint (push) Failing after 14m35s
2026-08-19 23:53:30 +00:00
Jon Chery a6510e7afc docs(pdlc): STATE.md Phase 0 intake — post-v1.28 ground truth snapshot
Populates the PDLC Phase 0 intake format with the absolute ground truth
of the system after v1.28 ship (CLI Canonicalization + Identity Layer).
Header bumped to v1.28 last-ship. 7 sections: header, architecture state,
technical stack, active constraints (D-001..D-231, INV-1..17, CAP-001..038),
recent history + quality gates (coverage 73.8% YELLOW — below 80% floor),
agent context + assumptions, canonical state references. Unknowns explicit
(no new initiative; CodeArtifact/KMS/kj-in-Lambda unverified in-account).

---ci---
project: acdl
phase: 0
milestone: v1.28
status: pdlc-intake
---/ci---
2026-08-19 23:53:19 +00:00
Jon Chery c0cb1887ed merge(milestone): v1.28 CLI Canonicalization + Identity Layer to main (release v1.27.6)
acdl-ci / Lint (push) Successful in 11s
acdl-ci / Test (push) Failing after 25s
nova-publish / Publish wheel + Lambda layer (push) Failing after 22s
Nova Slides Render / render (push) Failing after 13m46s
acdl-ci / Platform check-only (offline) (push) Failing after 14m25s
2026-08-19 23:48:04 +00:00
Jon Chery 139cb5077a merge(phase/06): v1.28 P6 final review + audit + milestone complete 2026-08-19 23:48:04 +00:00
Jon Chery adc55a17ab docs(milestone): complete v1.28 CLI Canonicalization + Identity Layer (release v1.27.6)
Nova Slides Render / render (push) Failing after 29s
---ci---
project: acdl
phase: 6
milestone: v1.28
status: complete
requirements:
  covered: [REQ-323..353]
  partial: []
---/ci---
v1.27.6
2026-08-19 23:47:44 +00:00
Jon Chery 0d8913a299 merge(phase/05): v1.28 P5 docs-integration complete (REQ-345..351, E2E + threat model) 2026-08-19 23:34:11 +00:00
Jon Chery 4697692ce7 docs(ship): P5 complete → v1.27.5 (v1.28 docs-integration)
Nova Slides Render / render (push) Failing after 26s
---ci---
project: acdl
phase: 5
milestone: v1.28
status: complete
---/ci---
v1.27.5
2026-08-19 23:34:11 +00:00
Jon Chery 23b8ff81d3 docs(P05): verify REQ-349/350/351 pass in combined suite (security-engineer)
---ci---
project: acdl
phase: 5
milestone: v1.28
status: execute
persona: security-engineer
---
Verification results (combined suite, .venv/bin/python -m pytest):

  REQ-349 (mode_resolver property tests, tests/test_mode_resolver.py):
    12 passed — all four priority levels + edge cases (TTY/piped stdout,
    missing credential, conflicting flag/env, invalid env value).

  REQ-350 (KMS round-trip, tests/test_kms_roundtrip.py): 1 passed —
    sign JWT via mock KMS → JWKS Lambda → pyjwt verify (CAP-037, DER→raw
    byte-correct).

  REQ-351 (PAT revocation SLO, tests/test_pat_revocation.py): 2 passed
    — issue → vend → revoke → 403 pat_revoked in <1s (D-229 strong-read).

  Combined suite regression run
  (pytest tests/ --ignore=tests/test_pptx_generator.py -k 'not live_aws
  and not slow'): 1000 passed, 5 deselected, 0 failed.

Fix: the first regression run flagged 1 failure —
test_no_forge_mentions_in_synced_files (REQ-230 v1.20 guard) caught two
forbidden forge-name mentions in the new docs (operator-guide §7,
developer-guide §9). Rephrased both to 'internal forge' / 'internal
forge runner' to keep the docs sync-safe. No code changes. Re-ran the
full suite: 1000 passed, 0 failed.
2026-08-19 23:30:41 +00:00
Jon Chery d0a8c363b2 test(P05): E2E integration test — sign-up→sign-in→token-vend→apply→audit (REQ-348, security-engineer)
---ci---
project: acdl
phase: 5
milestone: v1.28
status: execute
persona: security-engineer
---
Add tests/test_e2e_idp.py — the J1+J2 happy-path E2E flow. Uses moto
for DynamoDB (4 IdP tables) + mock KMS (test ECC keypair). Asserts:
(a) sign_up succeeds, (b) sign_in returns a session, (c) token-vend
returns a KMS-signed OIDC token, (d) the OIDC token verifies with the
JWKS key (pyjwt), (e) nova apply --local produces a JWS attestation
(HS256), (f) the JWS verifies with the PAT-derived key (+ tamper
detection), (g) the audit chain is complete + linked (auth.sign_up,
auth.sign_in, auth.session_created, pat.issued, token.vend.allowed —
all present, linked by user_id/jti, no raw password/PAT leaked
INV-16). Also: the credentials file stores the OIDC token not the raw
PAT (C-7.3), the DDB user item has a password_hash not the raw
password, the DDB PAT row has a pat_hash not the raw PAT. Negative
path: revocation breaks the chain (403 pat_revoked, D-229 strong-read
SLO, token.vend.denied audit event).
2026-08-19 23:22:53 +00:00
Jon Chery 04053df16e docs(P05): identity-layer threat model (REQ-347, C-6.2, C-9.2, security-engineer)
---ci---
project: acdl
phase: 5
milestone: v1.28
status: execute
persona: security-engineer
---
Add docs/threat-model.md covering 8 threats + mitigations: (T-1) password
compromise → Argon2id + fail-closed (D-228) + no raw passwords (INV-16);
(T-2) PAT theft → credentials.json stores OIDC token not raw PAT (C-7.3)
+ max TTL ≤24h dev/≤1h service-account (C-6.2) + strong-read revocation
(D-229); (T-3) JWKS DDoS → reserved concurrency 10 + 1h client cache +
optional CloudFront/WAF (C-6.2); (T-4) ABAC bypass → fail-closed
(C-6.1/C-7.1, INV-17, 7 tests); (T-5) KMS key compromise → key policy
restricts kms:Sign + 90-day rotation; (T-6) DER→raw ECDSA gotcha →
cryptography decode_dss_signature + CAP-037 round-trip test; (T-7) no
AWS-managed identity (INV-15); (T-8) audit trail integrity (INV-12 +
policy_sha D-231). Includes the C-9.2 INV-18..21 compression audit:
the spec's 4 attestation concerns (immutability, signature
verifiability, key derivation, no-managed-identity) are fully captured
by INV-6 + INV-15 + INV-16 + INV-17 + REQ-332 — no semantic gap.
2026-08-19 23:22:00 +00:00
Jon Chery bcbeb7badb docs(P05): developer guide for nova auth login (REQ-346, C-7.3, lead-developer)
---ci---
project: acdl
phase: 5
milestone: v1.28
status: execute
persona: lead-developer
---
Add docs/developer-guide-auth.md covering the 5-step quickstart (signup
→ signin → login → init → apply), nova auth signup/signin/login/status/
revoke, the credentials.json file (C-7.3: OIDC token + metadata only,
NOT raw PAT, 0600), D-226 mode resolution (flag → env → credential →
TTY) with the Edge 3 TTY-vs-piped-stdout case, the JWS-from-PAT KDF
(HKDF-SHA256, HS256 symmetric, REQ-332/C-5.2), and service-account PAT
usage in CI (max TTL ≤1h, C-6.2).
2026-08-19 23:20:54 +00:00
Jon Chery 1f4f7f0f81 docs(P05): operator guide for nova idp setup (REQ-345, C-6.3, lead-developer)
---ci---
project: acdl
phase: 5
milestone: v1.28
status: execute
persona: lead-developer
---
Add docs/operator-guide-idp.md covering nova idp setup --check/--apply/
--verify, the prerequisite IAM policy delta, the CloudFormation review
flow ($PAGER + y/N), --dry-run, --public-jwks-domain, and the C-6.3
grill additions: KMS key rotation (90 days, alias re-point + overlap
window), Lambda layer update procedure, DDB PITR restore procedure
(35-day window), emergency PAT revocation (DDB-level update-item on
nova-pats, bypasses CLI, satisfies D-229 strong-read SLO).
2026-08-19 23:20:21 +00:00
Jon Chery df2b83c86b merge(phase/04): v1.28 P4 token-vend-pat complete (REQ-336..344+340/341, CAP-037/038, ABAC fail-closed) 2026-08-19 23:17:31 +00:00
Jon Chery f68349d94d docs(ship): P4 complete → v1.27.4 (v1.28 token-vend-pat, highest-risk phase)
Nova Slides Render / render (push) Failing after 28s
---ci---
project: acdl
phase: 4
milestone: v1.28
status: complete
---/ci---
v1.27.4
2026-08-19 23:17:31 +00:00
Jon Chery 1863a85144 feat(P04): nova idp setup --check/--apply/--verify (REQ-340/341, C-2.1, backend+cli)
---ci---
project: acdl
phase: 4
milestone: v1.28
status: execute
persona: backend-engineer
---
2026-08-19 23:13:21 +00:00
Jon Chery 7dab9d5756 test(P04): CAP-037 KMS round-trip + CAP-038 PAT revocation SLO (REQ-350/351, security-engineer)
---ci---
project: acdl
phase: 4
milestone: v1.28
status: execute
persona: security-engineer
---
2026-08-19 23:11:43 +00:00
Jon Chery 14809327fb feat(P04): PAT lifecycle + nova auth login/revoke/status (REQ-342..344, C-7.3, security+cli)
---ci---
project: acdl
phase: 4
milestone: v1.28
status: execute
persona: cli-engineer
---
2026-08-19 23:11:16 +00:00
Jon Chery 0662ed26a3 feat(P04): nova-idp-jwks Lambda — JWKS endpoint (REQ-338, D-230, backend-engineer)
---ci---
project: acdl
phase: 4
milestone: v1.28
status: execute
persona: backend-engineer
---
2026-08-19 23:08:32 +00:00
Jon Chery cd3418a75e feat(P04): nova-idp-token-vend Lambda — ABAC fail-closed + KMS sign (REQ-336, C-6.1, backend+security)
---ci---
project: acdl
phase: 4
milestone: v1.28
status: execute
persona: backend-engineer
---
2026-08-19 23:08:06 +00:00
Jon Chery dee6d88d87 feat(P04): KMS ECDSA P-256 signing + DER->raw conversion (REQ-337, C-1.1, security-engineer)
---ci---
project: acdl
phase: 4
milestone: v1.28
status: execute
persona: security-engineer
---
2026-08-19 23:05:25 +00:00
Jon Chery fe0ee6aa45 feat(P04): kyverno-json ABAC policy + evaluator (REQ-339, D-227, C-5.1, security-engineer)
---ci---
project: acdl
phase: 4
milestone: v1.28
status: execute
persona: security-engineer
---
2026-08-19 23:04:27 +00:00
Jon Chery 701cc572ce chore(P04): kj-binary pin + platform/abac scaffold (C-8.2, D-227, backend-engineer)
---ci---
project: acdl
phase: 4
milestone: v1.28
status: execute
persona: backend-engineer
---
2026-08-19 23:03:07 +00:00
Jon Chery 0736924de2 merge(phase/03): v1.28 P3 idp-auth complete (REQ-333..335, CAP-036) 2026-08-19 23:00:37 +00:00
Jon Chery 05bf8bf221 docs(ship): P3 complete → v1.27.3 (v1.28 idp-auth)
Nova Slides Render / render (push) Failing after 24s
---ci---
project: acdl
phase: 3
milestone: v1.28
status: complete
---/ci---
v1.27.3
2026-08-19 23:00:37 +00:00
Jon Chery 7a7fbfed82 feat(P03): nova-idp-auth Lambda — sign-up/sign-in/session (REQ-333, backend-engineer) + CAP-036 E2E
Commits the full nova-idp-auth Lambda handler (sign_up/sign_in/create_session/
request_password_reset/reset_password) along with the CAP-036 E2E test
(test_idp_auth.py) covering the sign-up → sign-in → session flow, negatives
(401/409), password reset, and fail-closed 503.

---ci---
project: acdl
phase: 3
milestone: v1.28
status: execute
persona: backend-engineer
---
2026-08-19 22:58:59 +00:00
Jon Chery d06535032c test(P03): Argon2 fail-closed — ImportError → 503, no weak hash (C-1.2, security-engineer)
---ci---
project: acdl
phase: 3
milestone: v1.28
status: execute
persona: security-engineer
---
2026-08-19 22:58:57 +00:00
Jon Chery 8550ede810 feat(P03): Argon2id hashing — fail-closed, t=3 m=65536 p=1 (REQ-334, D-228, C-7.2, security-engineer)
The full nova-idp-auth Lambda handler is included in this commit (sign_up,
sign_in, create_session, request_password_reset, reset_password) since the
hashing module and handler share one file. The Argon2id hashing + fail-closed
logic is the security-engineer territory; the Lambda plumbing is backend-engineer.

---ci---
project: acdl
phase: 3
milestone: v1.28
status: execute
persona: security-engineer
---
2026-08-19 22:56:00 +00:00
Jon Chery 71562d9db2 feat(P03): DynamoDB identity schema + CFN snippet (REQ-335, backend-engineer)
---ci---
project: acdl
phase: 3
milestone: v1.28
status: execute
persona: backend-engineer
---
2026-08-19 22:55:10 +00:00
Jon Chery 91cb931bab merge(phase/02): v1.28 P2 lambda-packaging complete (REQ-329..332) 2026-08-19 22:52:36 +00:00
Jon Chery a8ef1e8864 docs(ship): P2 complete → v1.27.2 (v1.28 lambda-packaging)
Nova Slides Render / render (push) Failing after 26s
---ci---
project: acdl
phase: 2
milestone: v1.28
status: complete
---/ci---
v1.27.2
2026-08-19 22:52:36 +00:00
Jon Chery 291921a04e test(P02): attestations dir scaffolded + empty (REQ-331, backend-engineer)
---ci---
project: acdl
phase: 2
milestone: v1.28
status: execute
persona: backend-engineer
---
tests/test_init_attestations.py: nova init in a tmp_path creates
.nova/contract.yml.attestations/ as an empty directory (listdir == []).
The existing test_cli_subcommands.py asserts is_dir() but not emptiness;
this is the explicit REQ-331 assertion (freshly scaffolded repo has no
attestations yet — they are produced later by nova apply --sign-local-review
/ the JWS attestation flow, REQ-332).
2026-08-19 22:49:20 +00:00
Jon Chery c9bfc98713 feat(P02): nova apply --local --sign-local-review (REQ-330, REQ-332, backend-engineer)
---ci---
project: acdl
phase: 2
milestone: v1.28
status: execute
persona: backend-engineer
---
nova apply subcommand (44 lines, CAP-034: <=50 lines, <=3 functions, no if
except __main__ guard). --local calls core.env.synthesize_local_env() +
core.contract_resolver.resolve(). --sign-local-review calls
core.jws_attestation.sign_attestation() (REQ-332) and appends the JWS to the
output. Delegates to core/ — no business logic in the subcommand (NFR-7).
Auto-registered via nova/cli.py pkgutil discovery; CAP-033/034 tests pass.
2026-08-19 22:49:04 +00:00
Jon Chery ab069db3a4 feat(P02): JWS-from-PAT key derivation via HKDF-SHA256 (REQ-332, C-5.2, security-engineer)
---ci---
project: acdl
phase: 2
milestone: v1.28
status: execute
persona: security-engineer
---
C-5.2 grill fix: symmetric JWS (HS256) where the PAT is the shared secret.
derive_signing_key(pat) -> HKDF-SHA256(pat.encode(), salt=b'nova-local-
attestation', info=b'jws-signing-key', length=32) via cryptography (fallback
to hashlib HKDF). sign_attestation(payload, pat) -> compact JWS
b64url(header).b64url(payload).b64url(sig) with header {alg:HS256,typ:JWT}.
verify_attestation(jws, pat) -> payload (raises JWSValidationError on tamper
or wrong PAT; hmac.compare_digest constant-time). INV-14..17 enforced
(key derived from PAT, not cached, fixed salt/info, constant-time compare).
tests/test_jws_attestation.py: 20 tests (round-trip, tamper, wrong-PAT,
invariants, hashlib/crypto parity).
2026-08-19 22:48:21 +00:00
Jon Chery 3338ec1622 feat(P02): core/env.synthesize_local_env — local env synthesizer (REQ-330, backend-engineer)
---ci---
project: acdl
phase: 2
milestone: v1.28
status: execute
persona: backend-engineer
---
synthesize_local_env(contract_path, environment) reads a contract YAML and
produces a purely synthetic local env dict (account_id=000000000000
placeholder, region='local', local state_backend, local network) that
validates against schemas/environment.schema.json. Mirrors the shape of
core/environments/*.json + core/onboarding.py:generate_env_file() (shape
parity on the required env-binding keys). No cloud provisioning — purely
synthetic for nova apply --local. tests/test_local_env.py: 13 tests
(schema validation, region/account sentinels, env override, threshold
per-env, shape parity, missing-file default).
2026-08-19 22:47:37 +00:00
Jon Chery eb4fade710 refactor(P02): dual-use contract_ingestor — Lambda + CLI share core logic (REQ-329, backend-engineer)
---ci---
project: acdl
phase: 2
milestone: v1.28
status: execute
persona: backend-engineer
---
Extract dispatch_action() shared business-logic dispatch + _to_http_response
error mapper. lambda_handler (Lambda) + cli_main (CLI) become thin input
parsers that both delegate to dispatch_action. The action routing, contract
validation, DynamoDB write, error reporting live in shared functions — single
source of truth (NFR-7). tests/test_dual_use.py verifies both paths produce
the same output for the same input, both call dispatch_action, and code
share >=80% (CAP-026). 41 existing ingestor tests still pass.
2026-08-19 22:46:30 +00:00
Jon Chery 5dd7222571 merge(phase/01): v1.28 P1 cli-substrate complete (REQ-323..328, CAP-033/034/035)
Nova Slides Render / render (push) Failing after 26s
2026-08-19 22:42:12 +00:00
Jon Chery 5763e85bb7 docs(ship): P1 complete → v1.27.1 (v1.28 cli-substrate)
Nova Slides Render / render (push) Failing after 28s
---ci---
project: acdl
phase: 1
milestone: v1.28
status: complete
---/ci---
v1.27.1
2026-08-19 22:42:12 +00:00
Jon Chery 37f462783f docs(P01): verify — v1.28 cli-substrate (4 layers PASS, 809 tests, CAP-033/034/035)
---ci---
project: acdl
phase: 1
milestone: v1.28
status: verify
---/ci---
2026-08-19 22:41:00 +00:00
Jon Chery cba7c1c189 test(P01): forge action byte-identical structure test (NFR-11, backend-engineer)
tests/test_forge_action_byte_identical.py — 15 tests asserting the
structural invariants of the nova cli-action composite action
(.github/actions/nova-cli/action.yml). The action is consumed by both
the production forge + the dev forge via the same file path, so a
single source under test guarantees both platforms consume the same
bytes (the byte-identical requirement, NFR-11).

Structural invariants covered (the unit-testable subset):
(a) action.yml is valid YAML
(b) name present + non-empty
(c) inputs.command required: true
(d) inputs.contract / mode / version exist with documented defaults
    (.nova/contract.yml, "", "latest") and are not required
(e) runs.using == "composite"
(f) a setup-python@v5 step pins python-version "3.12" (REQ-326 AC3)
(g) an install step installs `nova` via both CodeArtifact
    (codeartifact login --tool pip) + fallback (--index-url) paths,
    parameterised by inputs.version
(h) a run step executes `nova ${{ inputs.command }}` with
    NOVA_CLIENT_MODE (from inputs.mode) + NOVA_CONTRACT (from
    inputs.contract) env forwarded

NFR-11 byte-identical source guard: the action.yml must not embed
forge-specific hostnames / org names / the dev-forge or consumer-mirror
names, and the install path must be selected by env var at runtime
(NOT a forge-identity conditional) — so the file stays byte-identical
across forges. Both asserted.

The full byte-identical cross-platform verification (NFR-11,
REQ-326 AC2) — running the action with identical inputs on a
production-forge ubuntu-latest runner + a dev-forge act_runner and
asserting identical stdout + exit code — is a CI matrix job, not a
unit test. It cannot be reproduced in-process (depends on two external
runner environments). Documented in the module docstring + the
action.yml header; the CI matrix job is defined out-of-band.

All 15 tests pass. No regressions in tests/test_pipeline_contract.py,
tests/test_deploy_workflow_env_input.py, tests/test_rotate_key_workflow.py
(77 passed). tests/test_no_forge_mentions.py passes (the test file +
action.yml + publish.yml are clean of forge-specific strings).

---ci---
project: acdl
phase: 1
milestone: v1.28
status: execute
persona: backend-engineer
---/ci---
2026-08-19 22:35:55 +00:00
Jon Chery fd3f9e17b9 feat(P01): nova cli-action composite action (REQ-326, backend-engineer)
.github/actions/nova-cli/action.yml — composite action discovered by
both the production forge (GitHub Actions) and the dev forge
(act_runner) via the shared .github/actions/nova-cli/ path. No separate
dev-forge action file is needed; the same path works on both platforms.
Consumers reference it via a versioned tag pin:
  uses: <org>/<repo>/.github/actions/nova-cli@v1.28

inputs:
- command (required) — the nova subcommand + args, passed verbatim to
  `nova`
- contract (default .nova/contract.yml) — forwarded via NOVA_CONTRACT
- mode (default "") — forwarded via NOVA_CLIENT_MODE (agent /
  interactive / plan-only / check-only); empty = let nova resolve
- version (default "latest") — pin to a released wheel version for
  reproducible runs

runs.using: composite with 3 steps:
1. actions/setup-python@v5 with python-version "3.12" (REQ-326 AC3)
2. Install Nova (CodeArtifact default + fallback index):
   - NOVA_CODEARTIFACT_DOMAIN set → aws codeartifact login --tool pip
     --domain $DOMAIN --repository nova-pypi → pip install nova==<ver>
   - else → pip install --index-url $NOVA_WHEEL_INDEX nova==<ver>
   Fails closed if neither is configured.
3. Run Nova: `nova ${{ inputs.command }}` with NOVA_CLIENT_MODE +
   NOVA_CONTRACT env from inputs.

NFR-11 byte-identical cross-platform verification is a CI matrix job
(production forge ubuntu-latest + dev forge act_runner with identical
inputs, assert same stdout + exit code) — not reproducible in a unit
test. Structural invariants are asserted by
tests/test_forge_action_byte_identical.py (next commit).

---ci---
project: acdl
phase: 1
milestone: v1.28
status: execute
persona: backend-engineer
---/ci---
2026-08-19 22:34:47 +00:00
Jon Chery 03adaa80a6 feat(P01): publish workflow — wheel + Lambda layer (REQ-323, CAP-035, backend-engineer)
Byte-identical .github/workflows/publish.yml + mirror on the dev forge
(<dev-forge>/workflows/publish.yml) — same file content, installed in
both locations per the repo's byte-identical workflow convention.

NFR-6 (wheel/layer co-versioning): on push to main affecting core/**,
adapters/**, nova/**, or pyproject.toml, the workflow publishes BOTH a
wheel AND a Lambda layer with identical version strings. If either
publish fails, the job fails and the merge is blocked (REQ-323 AC).

Steps:
- actions/checkout@v4 + actions/setup-python@v5 (python 3.12)
- aws-actions/configure-aws-credentials@v4 (OIDC, role-to-assume from
  AWS_ROLE_ARN secret, id-token: write)
- pip install build twine
- compute version: tomllib.load(pyproject.toml)["project"]["version"]
  → steps.ver.outputs.version (e.g. 1.14.0)
- python -m build --wheel
- twine upload dist/nova-<ver>-*.whl with two modes:
  * CodeArtifact: NOVA_CODEARTIFACT_DOMAIN set →
    aws codeartifact login --tool twine --domain $DOMAIN --repository
    nova-pypi
  * Fallback: NOVA_CODEARTIFACT_DOMAIN unset → TWINE_REPOSITORY_URL +
    TWINE_USERNAME + TWINE_PASSWORD secrets (any PEP 503 index)
  Idempotent: a re-upload that hits "file already exists" is treated as
  success.
- build Lambda layer: pip install --target layer/python/ the wheel +
  argon2-cffi + cryptography + pyjwt, then zip -r nova-layer.zip python/
- aws lambda publish-layer-version --layer-name nova-cli
  --compatible-runtimes python3.12 --compatible-architectures x86_64
  --description "nova-cli v<ver>" → steps.layer.outputs.arn
- aws ssm put-parameter /nova/layer/nova-cli/version =
  "<wheel-version>:<layer-arn>" (CAP-035)
- final guard step fails the job if wheel uploaded!=true or layer arn
  is empty

permissions: id-token: write (OIDC), contents: write (tag).
Secrets documented in the workflow header comments.

---ci---
project: acdl
phase: 1
milestone: v1.28
status: execute
persona: backend-engineer
---/ci---
2026-08-19 22:34:28 +00:00
Jon Chery 3a09ca8ec1 docs(P01): CodeArtifact provisioning check + fallback (REQ-323, backend-engineer)
CodeArtifact provisioning check in account 581513795199 could not
complete — no AWS credentials available in the P1 execute environment
("Unable to locate credentials"). Per the task spec, provisioning is NOT
attempted (requires codeartifact:* IAM grants not confirmed for the
execute principal). Documented as a P1 blocker for the CodeArtifact mode
of the publish workflow's wheel-upload step.

docs/codeartifact-provisioning.md records:
- (a) the attempted commands (list-domains, describe-repository,
  list-repositories) + the credentials-not-found error
- (b) the required IAM grants for a follow-up provisioning task:
  codeartifact:CreateDomain, CreateRepository, GetRepositoryEndpoint,
  GetAuthorizationToken, ReadFromRepository, PublishPackageToRepository
  + ssm:PutParameter (CAP-035) + lambda:PublishLayerVersion
- (c) the fallback: a private wheel index selected at deploy time via
  the NOVA_WHEEL_INDEX env var (consumers / composite action) and
  TWINE_REPOSITORY_URL + TWINE_USERNAME + TWINE_PASSWORD (publish step).
  The workflow supports both CodeArtifact mode (NOVA_CODEARTIFACT_DOMAIN
  set) and fallback-index mode (unset) — no single hostname is baked
  into the synced workflow files.

CAP-035 invariant (SSM /nova/layer/nova-cli/version = <wheel-version>:
<layer-arn>) is unaffected by the index choice and is recorded
atomically after both the wheel upload + layer publish succeed.

---ci---
project: acdl
phase: 1
milestone: v1.28
status: execute
persona: backend-engineer
---/ci---
2026-08-19 22:34:02 +00:00
Jon Chery d7971023b6 test(P01): tests/test_cli_subcommands.py — CAP-033 + CAP-034 (REQ-324, cli-engineer)
CAP-033: `nova --help` exits 0 and lists a subcommand for every
user-facing core/ module (15 expected subcommands parsed from help).

CAP-034 (AST scan, parametrized per nova/<module>.py excl. cli/__init__):
- (a) line count ≤50
- (b) ≤3 FunctionDef/AsyncFunctionDef
- (c) every bare ast.Call target resolves to a core.* import, a builtin,
  or a local function def (attribute/method calls allowed)
- (d) no `if` statements except `if __name__ == "__main__"`

nova init: in tmp_path, asserts .nova/, .nova/contract.yml.attestations/,
.gitignore created with all 6 secrets-exclusion lines; refuses existing
dir without --force.

---ci---
project: acdl
phase: 1
milestone: v1.28
status: execute
persona: cli-engineer
---/ci---
2026-08-19 22:30:29 +00:00
Jon Chery 6a8267e13f test(P01): tests/test_mode_resolver.py — hypothesis properties (REQ-349, cli-engineer)
Property tests (hypothesis):
- deterministic (same inputs → same output)
- flag wins (flag in {agent,interactive} → mode==flag, reason=="flag")
- invalid env ignored (env in {auto,""} → credential-or-tty result)
- no silent fallback (every result has non-empty selection_reason)
- credential+TTY → interactive, credential+no-TTY → agent

Edge cases (explicit):
- stdin TTY + credential → interactive (Edge 3 analog)
- missing credential → falls to TTY
- conflicting flag/env → flag wins
- env wins over credential
- invalid env warns + falls through
- resolve_mode_from_env reads --mode from sys.argv + NOVA_CLIENT_MODE

---ci---
project: acdl
phase: 1
milestone: v1.28
status: execute
persona: cli-engineer
---/ci---
2026-08-19 22:30:08 +00:00