Skip to content

fix(qsearch): seal confirmed-zero cancellation without losing accounting history - #75

Closed
AetherAI3 wants to merge 6 commits into
claude/qcomms-j6-nanofrom
codex/issue-58-confirmed-zero
Closed

AetherAI3 wants to merge 6 commits into
claude/qcomms-j6-nanofrom
codex/issue-58-confirmed-zero

Conversation

@AetherAI3

@AetherAI3 AetherAI3 commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Why does this change belong in Nano?

Addresses #58. A cancelled/failed provider job with authoritative final zero must be able to finish accounting without becoming a successful computation. Unknown zero must continue holding its reservation. This change connects the authoritative ATLAS transition to Nano's sealed outcome and existing offline/reseal recovery.

What changed?

Validate the exact additive AqrcQSearchZeroUsageEvidenceV1 projection against the client request digest, ATLAS request fingerprint, job, backend, ledger tags and explicit provider API version/source. Only a matching FAILED cancellation/error can seal zero with usage_pending: false. Unknown, unsupported or wrong evidence stays held. Existing positive behavior and old ATLAS positive-only fallback remain unchanged.

The existing v2 schema and HMAC domain stay unchanged; evidence is included under usage.zero_usage_evidence. Offline settled replay needs no provider credentials. Historical pending seals remain in the existing reseal history. Document the pinned SDK's old API limitation, explicit newer read-only metrics contract, public schema hashes, and cross-repo deployment compatibility.

For the coordinated #59 lifecycle bridge, export pure confirmed_zero_receipt(request, receipt) -> bool and reuse a single strict proof-identity predicate for raw ATLAS conversion and the sealed projection. Callers must authenticate the hardware HMAC with verify_seal_v2 first; the pure helper has no key and cannot authenticate a MAC. It rejects record-only/generic zero, unsupported schemas, wrong request/job/backend/tags and malformed failed hardware outcomes. #59 owns the lifecycle/service authentication gate and feature detection; it is not bundled in this PR.

Validation

  • Focused tests passed: 43 passed in confirmed-zero, real ATLAS, accounting contract suites, with real Predator verifier/journal/budget and fake provider only.
  • Expanded contract plus FakeFez smoke suite: 45 passed against combined ATLAS source. Full runtime test file: 25 passed after atomic test-counter publication.
  • Complete pre-helper suite at 179d733: 1718 passed, 3 skipped in 331.41s.
  • Helper suite at 13d6a94: 1756 passed, 3 skipped in 228.95s.
  • Current final head ac1ce04: 1757 passed, 3 skipped in 249.81s. Full-run skips are optional aether_protocol_c, opt-in standalone real FakeFez v2 dry run, and intentionally removed README test count. Original failed runs and controls are retained below.
  • Documentation and examples match the shipped behavior.
  • Independent breaker review corrected stale receipt overwrite, wrong reservation release, positive usage replacement, restart instance binding and exact proof-schema compatibility.

Boundary check

  • Deterministic reference execution for identical graph/frame inputs is preserved.
  • No host DecisionGate bypass or external actuation was added to Nano source/runtime.
  • Engineering/offline tests only: no QPU reads, submissions, cancellations, budget resets/increases, credentials or live mission changes.

Coordinated contract

Base: reviewed claude/qcomms-j6-nano at b6ba654.

Deploy coordinated consumers before enabling confirmed zero. Older ATLAS pins keep zero held; older Predator verifiers reject settled zero. The opt-in v3 provenance lane at Nano 1d39d66 is not activated/cherry-picked here; production remains v2, and v3 zero-proof adapters remain a separate compatibility task.

Combined #59 lifecycle/zero-accounting projections initially failed the isolated control (verified zero reported HELD). The authenticated bridge at #78 head772afe29dfc077c3c4650f683af6696df91f6025 now passes actual strict acceptance in unpublished local candidate16a0d6b52525f053cace1d659a398d524689497b: 13 strict restart/status/replacement/real-ledger tests passed, and a broader bridge/helper/lifecycle/accounting review suite passed109 tests. It uses isolated ATLAS candidate3803d26ad3a1d5be7436e44c3f19983cf233a0ac (fdfe927 + no-wait35546e6), whose201 accounting/runtime tests also passed. These local candidate results are not published/merged acceptance or CI. Hosted checks remain unreported. No workflow or publishing/deployment action was added or triggered by this lane.

Original failed runs and fixture controls

These are retained failures, not reclassified passes or benchmark improvements:

  1. Initial complete run: 1716 passed, 3 skipped, 2 failed in 548.05s. One new extra-key proof test ran in a process that imported the helper before the exact-key correction; the later green focused suite verifies rejection. The other failure was test_fakefez_dry_run_receipt_is_hardware_sealed_and_selects_under_a_grant, HARDWARE_SELECT_DISAGREES.
  2. Independent clean Nano b6ba654 base control reproduced that same FakeFez failure (1 failed in 52.62s). The test file was untouched at that base. Exhaustive 16-state control found minimum energies -1.6 and -1.5999999999999999 (gap 2.22e-16), ordered differently by raw classical comparison and the hardware selector's existing tolerance. Fixture-only f4686c7 changes linear[0] from -1.0 to -1.125, giving gap 0.125 and explicitly asserting gap >0.1. Production selectors/tolerances and recorded experiments remain unchanged.
  3. Stable-head full run at f4686c7: 1717 passed, 3 skipped, 1 failed in 299.93s. test_wall_budget_is_per_job_not_per_attempt failed at int(marker.read_text()) with an empty test counter after its child was terminated mid-write. This helper was unchanged from b6ba654. An independent Windows interruption control reproduced an empty legacy marker; atomic temp-write/close/replace retained the previous complete marker. Harness-only 179d733 makes that publication atomic; the 1-second budget, TimeoutExpired assertion, attempts <=1 and elapsed <2.5 assertions remain unchanged. No production runtime file changed.

No registered benchmark metric, experiment result, runtime budget or quantum performance claim was changed. Per the latest user direction, #59 is the single captain for serialized dependency verification and authorized admin merges; this lane does not merge independently. Nano reports no available repo runners and no AETHER_CI_RUNNER variable. The captain has confirmed existing shared AETHER-CLOUD capacity and owns any branch-only bounded harness dispatch; this lane dispatches none. Issue #58 remains open until coordinated merged acceptance is verified.

Verified integration disposition

This exact source head ac1ce0412d0dd364e3791279a530366ad79f2be6 is an ancestor of actual integration commit cb6ea884d63dcaa8cc0e7c0b952bb88784e8219f, delivered by #82 to main. The source is included; no duplicate patch or separate source-PR merge is needed.

The human explicitly authorized the three integration PRs Nano82/ATLAS188/Predator460 to use reviewed passing LOCAL evidence in place of the earlier self-hosted gate. The waiver is recorded verbatim in those merged integration PR bodies; it is not a passing CI claim or a separate waiver-based admin merge of this source PR. Cloud41322926091 remains FAILED STARTUP with zero jobs/check runs. Local source pins, commands, counts, skips, review limitations, merged trees and actual target branches are recorded there and in the captain evidence bundle.

This source PR is retired as included/superseded by that actual integration. Issue #61 remains open for incomplete service-wire acceptance; other issue closure requires its own acceptance audit. Branches are preserved. No formal GitHub approval, production activation, runner/security/credential change or provider execution occurred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant