feat(cli): generate collision-safe service query wiring - #1664
feat(cli): generate collision-safe service query wiring#1664rickylabs wants to merge 56 commits into
Conversation
|
[PHASE: RESEARCH] Re-baselined #1355 and #1360 at Findings
Evidence: research.md Next
|
|
[PHASE: PLAN] Tier-A plan review returned Plan
T-1 — evidence class repaired
T-2 — exact lease-precondition scenarios
Determinations
Open decisions for PLAN-EVAL
Evidence: plan.md Next
|
…nerator paths Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TiYhwUCkdyjziEpFP3kgaS
[PHASE: PLAN-EVAL] [VERDICT: FAIL_PLAN] — cycle 1/2Plan Ruling on the forkDirect emit — no SDK overload. Generated constant becomes Findings
Verified and holding: all diagnoses re-derived at source (key shapes, Next
|
Fork ruled for direct emit: the overload is an identity wrapper, does not remove the trap, and would couple the CLI template to SDK >=0.0.7 so a 0.0.7 CLI generating into an sdk@0.0.6-pinned app emits a module that fails deno check. Six plan-text fixes dispatched. Cycle 2 requires a coordinator grant. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LQBHX8KpA5aYtDraq46J8a
|
[PHASE: PLAN-UPDATE] [CYCLE: 1] Repaired all six Rulings recorded
Preserved decisions
Validation
NextCoordinator verifies this exact head and separately grants PLAN-EVAL cycle 2. This implementation session does not launch it. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrhsQgBYpLZWHKAhCvESi6
[PHASE: PLAN-EVAL] [VERDICT: PASS] — cycle 2/2Repaired plan Fork rulingCycle-1 ruling stands and is complied with: direct emit Checked
Implementation constraints (non-blocking; IMPL-EVAL to verify)
Next
|
Evaluator verified clientKey exists in published sdk@0.0.6 rather than inheriting cycle 1's claim, and caught that the SDK-0.0.6 test was named for a property it did not assert. C1-C3 recorded as implementation constraints. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LQBHX8KpA5aYtDraq46J8a
|
[PHASE: IMPL] [SLICE: S1] S1 is complete at Scope delivered
Tests
Focused evidence at the committed content head
Next: STOP. S2 requires a separate coordinator dispatch. |
|
[PHASE: IMPL] [SLICE: F5] Canonical post-init generated content is implemented under the reviewed 15-product/12-test ceiling.
Binding receiptsAll four were generated by
Exact-set Prior failure records and the Fresh 45 / SDK 3 |
|
[PHASE: IMPL] [SLICE: S5] S5 attempt 4 executed at the immutable leased evidence head
No retry, product repair, lock/docs change, readiness change, or evaluator action was performed. Evidence was committed after the gate sequence at |
|
[PHASE: PLAN] [SLICE: F6] F6 is committed and pushed as a plan-only amendment at Disposition
Exact later ceiling
No third path is authorized. Locked repair
Evidence: NextFresh Tier-A must approve the amendment before either authorized code path changes. No runtime lease is requested. |
|
[PHASE: IMPL] [SLICE: F6] F6 implemented the reviewed repair in exactly the two authorized paths:
The content head is The serial binding sequence stopped honestly at the first red:
The sole failure is the unchanged Exact-set sufficiency over the four named files is INSUFFICIENT: Durable evidence is committed at |
|
[PHASE: IMPL] [SLICE: F6] [BINDING-RECOVERY] The first F6 binding-test receipt remains an append-only red:
Coordinator review established the failure as environmental. F5 had 4,226/0/19 = 4,245 results; F6 attempt 1 had 4,228/1/19 = 4,248, so the F6 delta added three results and two additional passes. The sole failure was the forbidden-command walker receiving The coordinator quarantined that tree recoverably:
The leaf did not delete, chmod, move, or mutate the residue. Attribution was committed and pushed before the rerun at Exactly one distinct environmental rerun then executed at the unchanged content head:
All three F6-added results remain present and now pass, confirming the environmental attribution. The two conditional gates then ran serially and passed at the same content head. Exact contracted passing set
All four attest The original No product, template, fixture, lockfile, documentation, expensive gate, browser, Aspire, Docker, lease, evaluator, readiness, label, or metadata change occurred. |
|
[PHASE: IMPL] [SLICE: S5] [ATTEMPT: 5] The singleton release-gate lease executed exactly once at immutable leaf evidence head Gate verdicts
The complete pretty transcript is: SHA-256: The suite-owned NDJSON event log—containing all 70 exact step IDs, verdicts, durations, and evidence—is: SHA-256: The pretty stream has 68 explicit PASS lines plus one FAIL. The 69th pass is the suite runner's synthetic The complete transcript was streamed through Runtime findingsThe repaired generator/runtime seams remained green:
The sole red was The probe failed before CDP connection, navigation, mutation, or refetch-count assertions. This is not a refetch-behavior verdict; the behavior remains unproven. At pre-implementation Cleanup and lease release
Three run-owned stopped NuGet helper processes were observed, but all exited naturally between ownership verification and the targeted TERM call; every signal attempt returned The host is proven empty and the leaf releases the singleton lease. The post-browser cleanup audit is NOT_REACHED / NOT_APPLICABLE because Durable report: Evidence commit: |
|
[PHASE: PLAN] [SLICE: F7] F7 is committed as a plan-only amendment at Measured disposition
Reviewed ceiling for a later repair
The plan names Deterministic cheap proof
Explicit precondition failure, recorded skip, and host provisioning remain coordinator-owned alternatives; this amendment chooses none. See NextFresh Tier-A review. No implementation before approval. |
|
[PHASE: PLAN] [SLICE: F7-C1] F7-C1 is committed at Corrected classification
Strict selection contractThe portable override is
Bounded diagnostics and proofThe existing two-path ceiling remains:
The 32 KiB continuously drained tail and target/status race remain. Early exit reports selection source/path, code, signal, and stderr; live target timeout preserves its cause/text and adds source/path without inventing an exit code. The proof matrix binds managed-binary version selection, override precedence, exhaustive invalid/no-fallback cases, immediate code-2 stderr, bounded chatty output, live timeout, and all F6 proofs. See |
|
[PHASE: IMPL] [SLICE: F7] [GATE-STOP] F7 stayed inside the reviewed browser-probe/test pair. Strict The serial binding sequence stopped honestly at
The sole failure is the unchanged teardown walker receiving No retry or residue mutation occurred, and the downstream gates were not started. Exact-set recomputation over the four paths is INSUFFICIENT: Evidence head pushed: |
|
[PHASE: IMPL] [SLICE: F7] [BINDING-RECOVERY] Environment-only binding recovery completed at immutable content The original Exact passing set:
Exact-set recomputation: SUFFICIENT, reasons Recovery evidence is committed at |
|
[PHASE: IMPL] [SLICE: S5-A6] [VERDICT: FAIL] Attempt 6 executed exactly once from a clean detached checkout at the leased evidence head Gate verdicts
Browser selection evidence
Suite-owned evidence
Cleanup and audits
Evidence commit: No product/test mutation, second runtime attempt, browser gate, evaluator, readiness/label/acceptance change, merge, or quarantine deletion occurred. |
|
[PHASE: PLAN] [SLICE: F8] Edited in place. This comment originally cited Contamination and repair.
Plan content (unchanged by the repair). Attempt 6 is attributed exactly: managed Chromium selection and launch are proven, while The amendment keeps the exact two-path ceiling: Artifacts at |
`d8d5ee619` carried a `leak-report.md` change the plan author did not produce: a supervisor host audit ran into the author's checkout and rewrote the `Generated` timestamp and `Worktree` line. Restore the file byte-for-byte to its blob at `2385cdb72` and record the provenance correction in the run worklog. Append-only: `d8d5ee619` is not amended or rewritten. F8 plan content is untouched. No gate, audit, or leak-check was run.
Evaluates head 4255a57 vs baseline 2385cdb (plan-only delta; no packages/**, test, template, fixture, or lockfile mutation). All six F8 criteria met: 1. CdpClient.connect and CdpClient.send identified as the only two unbounded primitives from code measurement; ledger's evidentiary limit honestly recorded. 2. Bound contract is diagnostic: CDP WebSocket connection + URL + 20000 ms vs CDP response + method + 20000 ms. 3. 20000 ms is 45x below the 900000 ms suite boundary. 4. Deterministic unit-level reproductions (inert socket and never-returning send) with watchdog tests; no browser, Aspire, Docker, or runtime suite required. 5. Path ceiling is exact, narrow, and explicitly affirmed sufficient (two paths: service-client-browser-probe.ts + service-client-runtime-probe_test.ts). 6. F6 teardown contract (no discard sink, same drain, natural-exit / active-SIGTERM / three-negative / delegation proofs) and F7 selection/startup diagnostics (strict override, runnable/version probing, bounded startup, no-versioned-cache-literal) remain green. Authority: native-quota fallback for formal_plan_evaluation per lane-policy.md:65 (Codex author quota blocked until 2026-08-20). Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Generate app-side service client/query modules with per-router cache identity, typed invalidation, and canonical Fresh cache-age wiring.
PLAN-EVAL is terminal PASS and S1-S3 are complete. The PR remains draft; no expensive gate has run.
Closes #1355
Closes #1360
Phase 1 findings
exampleService*exports cited by feat(cli): app-side client/query wiring is a one-shot template with hardcoded names, colliding 'service' cache keys and a no-op invalidation #1355 were already replaced with service-derived names by fix(docs/sdk): teach one client module and query dialect #1424 and moved by fix(scaffold/frontend): make the default app the canonical reference #1427.servicewhile invalidation addresses[routerName, 'list']; the prefixes cannot match.service generateexists but only regenerates Aspire helpers; it does not enumerate service clients or expose dry-run/force.initialDatawith a 15-second stale time but discardcachedAtinstead of passinginitialDataUpdatedAt.Detailed evidence: research.md and plan.md.
Proposed contract
clientKey(), and lock string-helper match/mismatch semantics.{ queryKey: <svc>Queries.list.clientKey() } as constemission plus one manifest-driven generator owningapps/<app>/lib/<service>.ts, with whole-command dry-run/force and published README migration guidance.PLAN-EVAL cycle 2 is terminal
PASS. Cycle 1 ruled direct emission and package README locations; cycle 2 verified the repaired plan and published SDK 0.0.6 compatibility. Implementation advances only by separately dispatched bounded slices.Slices
5ac6efa30).3669e9b87).1df8a5274).32ea23f50; all four fresh binding receipts PASS at that immutable content head and exact-set sufficiency is SUFFICIENT. Evidence is committed at1c1f45820; awaiting Tier-A acceptance.scaffold.runtimeexact-head proof plus a catalog-backedfresh-browserreceipt.Drift / Debt
service generateexists but lacks client generation; SDK key-bridge JSDoc is stale; the frontend overlay reference is missing; the initial plan's scaffold catalog classification was corrected append-only.Definition of Done
cachedAtasinitialDataUpdatedAt, with generated-output guards and a lease-gated browser regression wired intotest:browser.checkhas a PASS durable receipt at the final content head.testhas a PASS durable receipt at the final content head.publish-dry-runhas a PASS durable receipt at the final content head.arch-checkhas a PASS durable receipt at the final content head.scaffold.runtimehas suite-owned PASS output at the final content head, with the central expensive-gate lease and cleanup record.fresh-browserhas a coordinator-leased catalog/run-gate PASS receipt at the final content head.Validation
Through S3:
1df8a5274— PASSprivate-type-refdiagnostics; S3 changed no Fresh source/export type and S4 owns final attributionpackages/bench/README.md; both touched package READMEs conformdeno task quality:gate— PASSpackages/sdk/mod.ts) — baseline failure in exactly two pre-existingQueryClientprivate-type references (QueryClientPortandcreateNetScriptQueryClient) for that root-entrypoint run; neither was introduced by this leaf. The full 12-entrypoint export-map sweep is S4 and may surface further diagnostics.git diff --check— PASSgenerated.deno-lintexpectation; fresh bindingcheck,test(4,202/0, 19 ignored), workspacepublish-dry-run, andarch-checkreceipts all PASS at32ea23f50.