Skip to content

Integrate bounded Q-search lifecycle and compiler contracts - #82

Merged
AetherAI3 merged 75 commits into
mainfrom
codex/nano-67-combined-evidence
Nov 1, 2026
Merged

AetherAI3 merged 75 commits into
mainfrom
codex/nano-67-combined-evidence

Conversation

@AetherAI3

@AetherAI3 AetherAI3 commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Integrates the coordinated Nano #67 source stack and its reviewed compatibility fixes. Refs #58–66; issue closure remains a separate acceptance audit.

Includes PRs #49, #51, #52, #75, #71, #78, #72, #77, #81, #74, #80, #73, #79 and #76 in dependency order, plus combined zero/accounting/prepared-lifecycle regressions. PR #50 is the superseded standalone compile-options alternative and is not duplicated. Retains both diagnostic and package exports and defers quantum CLI imports until selected dispatch.

Proposed head: 35e93f8. Base: main d740bb5. Tree: 81f40511d80818661b6c067397caee884a47d3a4, identical to the locally verified 2,446-pass/3-skip combined tree.

Actual self-hosted verification is pending. No CI pass is claimed. Preserve budgets and default-off hardware gates; no live quantum jobs, cancellation or spend is authorized. #61 legacy QSearch service-wire lowering is incomplete and must remain open.

Self-hosted dispatch attempt: failed before execution

  • Harness/source ref: AetherAI3/AETHER-CLOUD codex/nano-67-self-hosted-evidence at de95c47d32de89b0ad80b5484240336d6d2133ea.
  • Requested exact integrated sources: Nano 35e93f8fed267d8e9e730ea1f736c0bb984b767c, ATLAS 3803d26ad3a1d5be7436e44c3f19983cf233a0ac, Predator ebe1efccb391a42aa5176e31dbfe9a81362d0901.
  • Run 41322926091, attempt 1: startup_failure, 2026-11-01 15:46:39–15:46:40 UTC.
  • Configured runner: existing vps6-heavy-03 (registration 28). Actual runner/job ID: none; zero jobs and zero check runs. No candidate test command executed and no JUnit/artifact was produced. Test pass/fail/skip counts are therefore unavailable, not zero failures or a pass.
  • Requested plan: full Nano suite, contribution check and wheel checks; ATLAS Q-search/accounting suites; Predator receipt/lifecycle/ledger/J11/A2/A4/J5/pilot suites, using pinned Qiskit/Aer/Runtime and fake providers only. The job never reached this plan or private checkout.
  • Exact startup cause remains unexposed by inspected APIs. Static actionlint and local mock controls are not runner evidence. No blind rerun, alternate route, merge or formal approval follows from this failure.
  • Predator's target subsequently advanced to c99594c26804d8801d6aec8ac590e7d2fa23b760; that reconciliation is local and needs its affected checks before final integration evidence.

Merge remains gated on actual passing exact-source self-hosted evidence and acceptance. Local totals cannot substitute for it. Nano #61's legacy service-wire gap remains open.

Current base refresh: no new runner execution

Current head: 2f63dc7f0a706fecc02ccd6f201baf1b40c2f305. Live target: main at 49f3c3f03966395901cc59381f420d0479497140.

Merged the already verified README main commit into the code candidate. Only README.md and docs/status.md changed from historical head35e93f8. README is byte-identical to merged docs; scoped LOCAL docs checks20passed1existing skip. Compiler/runtime/provider code is unchanged.

The failed historical run41322926091 requested prior heads and executed zero jobs; it supplies no passing evidence for this refreshed head. No new manual dispatch, alternate runner route, formal approval or feature merge occurred. Actual necessary exact-source self-hosted tests remain mandatory. The merged README stays intact, and issue61 remains open for its unfinished service-wire acceptance.

Explicit human waiver and reviewed local-test merge basis

The human explicitly waived the earlier self-hosted-test gate only for Nano #82, ATLAS #188 and Predator #460, using the reviewed passing local evidence:

Question: Self-hosted CI still hasn’t executed any jobs. Do you explicitly waive your earlier self-hosted-test requirement and authorize admin-merging Nano #82, ATLAS #188 and Predator #460 using their reviewed, passing local test evidence?
Answer: Yes, merge using local tests

This does not change the facts: Cloud run41322926091 at harness de95c47d32de89b0ad80b5484240336d6d2133ea is FAILED STARTUP, with zero jobs/check runs, no assigned runner/job ID, and no test/JUnit/run artifact. Its exact cause remains unclassified. There is no passing self-hosted CI claim. Configured runner28/vps6-heavy-03 was never assigned this job. Nano's separate hosted checks have explicit billing-lock annotations and no executed steps.

All checks below are LOCAL on the laptop, with fake providers, isolated credential-free child environments and default-off hardware gates. No paid-model/provider job, cancellation, spend, production activation, runner/security/credential setting change, or formal GitHub approval is authorized or performed. Issue #61 remains open for unfinished native prepare/sample service-wire acceptance.

Local evidence and review

  • Full combined runtime tree at 5e4373dbd8e093f50398ed46146ec167911352cc (tree 81f40511d80818661b6c067397caee884a47d3a4): 2446 passed,3 skipped, zero failures/errors, 298.99s. Command: python -m pytest -q -ra with explicit ATLAS 3803d26ad3a1d5be7436e44c3f19983cf233a0ac and Predator ee7e5cd1db7dc7cd7120003001c45f6b98552c8d, pinned Qiskit2.3.1/Aer0.17.2/IBM Runtime0.46.1. Skips: optional aether_protocol_c absent; README-count claim absent; Windows symlink privilege unavailable. These are not hardware tests.
  • The current candidate retains identical runtime/compiler code and adds only the merged README/status plus availability wording. Exact final-head command python -m pytest tests/test_docs.py tests/test_quantum_command_host.py -q -ra: 26 passed,1 existing README-count skip, zero failures/errors. python examples/quantum_command_demo.py succeeds locally with100 samples/verified/local_ideal; pinned example676 remains unchanged. Final manifest/log/JUnit: nano-67-final-availability-local-checks.json/.txt/.xml; demo nano-67-final-demo.json.
  • The exact current Predator integration head efa7cb6ef0b3481330eb6db1634ecc99f0835ad8 passed522 local cross-repo/receipt/lifecycle/ledger/J11 cases with zero skips/failures; differences from the original full-run Predator are the independently reviewed v3 validator repair and current target tooling/report, with protected target files preserved.
  • Acceptance evidence includes fake-clock11-hour queue expiry/bounded polling; durable cancellation request/dispatch/terminal confirmation; restart/replay/lost-ack duplicate fencing; queued/running/done races; MAC-authenticated read-only status; independent held/settled accounting; target-bound linked replacement; stable sanitized SDK errors. See the captain's nano-issue59-evidence.json test-name mapping.
  • Reviewed fixes retained in ancestry: lazy quantum CLI dispatch 92f93568632691bcf01fa3177e0d16a100676f3e, frozen v3 consumer validation 633953e063472b531598807a68426382ff0c43d9, export union and combined regression tests. Independent reviews found no blockers within scope.
  • README83's full section/pinned example is preserved. Availability now says included in this source checkout; no PyPI release, hardware qualification or completion of issue61 is implied.

Exact pre-merge identity

  • Source head: 7d8fdaeb6d35eebe374b9a1c9f16809b07795578.
  • Actual target branch: main at 49f3c3f03966395901cc59381f420d0479497140.
  • Proposed GitHub test-merge commit: cb0cbc6b1be8c7073ddc71c21eed6fe1bf547992.
  • Reviewed/proposed tree: 04a3ea8489259583f5cbb274dc94f3bd7f1a98fb.
  • Parents: target 49f3c3f03966395901cc59381f420d0479497140, source 7d8fdaeb6d35eebe374b9a1c9f16809b07795578.
  • The eventual GitHub merge SHA will be verified separately; it is not presented as the already-tested local commit.

AetherAI3 and others added 30 commits October 31, 2026 07:45
…rget (HW0 N2)

compile_program(job, backend=...) transpiles an ibm_fez job against the live
backend's Target (coupling map and supported instructions) instead of FakeFez,
checks every ISA instruction against that target, and freezes it: the backend
name and a structural target digest ride in the ISA metadata (so the QPY bytes
bind them), in compile_record and in compiled_plan_digest. The device ISA gets
a fixed name so an identical recompile yields the same ATLAS child identity.
fake_fez and heron_heavy_hex compile exactly as before (plan digests verified
byte-identical to d740bb5); one compile path, target source chosen by target.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ext and provider limits (HW0 N1, N3, N4)

N1: on a PredatorCampaignV2 ledger the ibm_fez context is ATLAS
resolve_qsearch_context (service, instance, backend), resolved once per run
before compiling, and the compiled plan must be bound to that backend's target;
a V1 ledger keeps the declared-identity context and stops BLOCKED as before.
N3: the child's max_execution_time is the job's limits.max_qpu_s, so the
provider limit and the ledger reservation are the job's ceiling.
N4: POST /qsearch/v2/submit_request answers only with NANO_QSEARCH_V2=1 (404
NOT_ENABLED before auth otherwise), uses the v1 request auth, cross-checks the
descriptor against every job, compiles each job, prepares one ATLAS request and
runs it once (run_qsearch_request_dry / submit_qsearch_request). The receipt is
predator.qsearch.receipt.v2: per-block raw msb_first counts plus the v1-style
audit, hardware and usage blocks, sealed under the v2 hardware domain; anything
short of every block is NOT_RUN with no blocks. Requests are recorded before
submission, submitted at most once, and re-attached on restart through ATLAS
recover_qsearch_submission. Seal parity is tested against Predator's production
verifier and client when importable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…agonal QUBOs, calibration-ranked layout

CompileOptions (env NANO_QSEARCH_BASIS_PREP=1, NANO_QSEARCH_LAYOUT=target|calibration:<snapshot.json>,
NANO_QSEARCH_LAYOUT_BACKEND) extends compile_program (options=None reads the env; unset = unchanged compile
and digest). basis_prep: a strictly diagonal QUBO is prepared as its unique minimiser (x + measure), so the
output no longer depends on the QAOA angles. layout: a circuit without two-qubit gates on a Fez target puts
logical bit i on the i-th best qubit by readout + half x error, skipping qubits with missing error or T1,
ranked from the transpile target or a calibration snapshot. The compile record and digest carry a rewrites
block when any option is on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…get and the layout ranking

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ot collide with the HW-0 device compile

compile_program(job, *, options=None) composes with HW-0 N2's compile_program(job, *, backend=None);
FEZ_TARGETS / _fez_backend replace DEVICE_TARGETS / _device_backend, which N2 defines with another meaning.
No behaviour change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tatus, flags before live context

H1: once ATLAS has handed a request or job to the provider (QSearchSubmittedPending,
or a ledger row with a job id or an ambiguous submission) Nano never seals NOT_RUN:
the runtime returns None, the service answers 503 and keeps the row ACCEPTED, and
the request finishes through recover_qsearch_submission. A provider-terminal failure
(ERROR / CANCELLED / max time) or a submitted result that does not audit is sealed as
v2 FAILED (blocks [], block_count 0, reason, hardware with the provider job id, usage;
hardware seal), matching Predator's build_failed_v2. A reservation ATLAS released is
NOT_RUN. v1 singletons: a submitted job answers 503 until recovery (L1: recover_job
re-attaches through ATLAS on repeat or restart, recompiling against the live target
and requiring the child's compiled plan digest); a provider failure is REFUSED.
M3: GO, LIVE and (N > 1) PACKED are checked in Nano before any live context is
resolved, so no QiskitRuntimeService is built when one is missing.
Also: prepare_qsearch_request gets client_request_digest; hardware.job_tags carry
ATLAS's effective tags (recovery tag first, ledger tag second); a FAILED reason names
the provider status only, never provider free text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
compile_program(job, *, backend=None, options=None): the live-backend device compile (N2) and the
default-off J2 rewrites compose; with a live backend the layout ranks the live target's qubits
(layout=target) or a snapshot entry checked against its width (layout=calibration), and the placement
is passed to the device transpile as initial_layout. Integration branch for lane J3; not for main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- layout=calibration ranks only the job's own device entry (a fake_fez rehearsal may read ibm_fez); another
  device's same-width entry is refused instead of placing fez qubits by its errors
- layout_backend without layout=calibration is refused, not silently ignored
- layout=target records errors_digest, a digest of the error numbers it ranked
- calibration entries are shape-checked and read for qubits 0..num_qubits-1 only (ValueError otherwise)
- diagonal_ground refuses a non-finite entry instead of reading it as a 0 bit

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he Nano process environment

env -> IbmRuntime default_compile(job, backend=<live>) -> compile_program(options=None) -> from_env:
basis prep + snapshot layout applied on an ibm_fez live-target compile; another device's entry refused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… target per request, compile time recorded

J6 preregistration section 3 item 2 (Predator 815d981f). The v2 request PUB limit
is NANO_QSEARCH_V2_MAX_PUBS (default 16 = unchanged; 1..4096; an invalid value stops
the service at startup) and is checked before any job is parsed or compiled.
A request's jobs compile against ONE resolved target (compile.compile_jobs: the
live backend frozen once with its target digest, one FakeFez for a dry run,
compile options read once); every plan equals the per-job compile. ATLAS gets the
request PUB bound: qsearch_max_request_pubs(ledger) for ibm_fez (ATLAS 024f524),
the service limit for a FakeFez dry run. Compile seconds, job count and target
resolutions go to the request row's record_json and the log, never into the sealed
receipt. The live binding check digests the target once per request.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…argets (J6 A2)

PREREGISTRATION_J6 amendment A2: if the ibm_fez run ends BACKEND_WAIT,
J6 re-runs once on the less-loaded of ibm_kingston / ibm_marrakesh. Nano
accepts both as live targets with ibm_fez's semantics exactly.

- job.TARGETS, request.REQUEST_TARGETS / LIMITED_TARGETS and
  runtime_ibm.IBM_TARGETS / LIVE_TARGETS add both: GO / authority / QPU
  seconds / LIVE / PACKED gates, live context, device binding, recovery
  through ATLAS, never a dry run. DRY_RUN_TARGETS stays ("fake_fez",).
- compile: DEVICE_TARGETS adds both; LIVE_ONLY_TARGETS compile only
  against their resolved live backend (no FakeFez stand-in; refused
  without one). A calibration layout ranks the backend's own snapshot
  entry (SNAPSHOT_ENTRIES), never another device's. ibm_fez / fake_fez /
  heron compiles are unchanged.

Tests: target lists; unknown targets refused at job and request parse;
QPU-seconds rule; every Nano gate; a kingston/marrakesh request end to end
through the fake ATLAS (context once, compile on its backend, submit,
recovery); a dry_run receipt for them is refused; device compile against
FakeMarrakesh's target binds the backend and refuses any stand-in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ce doc (J6 A2)

Same gates as ibm_fez, never a dry run, compile only against the resolved
live backend, calibration layout from the backend's own snapshot entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…counting promotion gate)

PREDATOR_QCOMMS_J_FOLLOW_THROUGH_V1 section 2, "Remaining accounting blocker",
option "defer final receipt completion until accounting is final". A live
(non-dry) v2 request whose ATLAS result is DONE or FAILED but whose usage is
missing or zero is held ACCEPTED: 503 ACCOUNTING_PENDING (ACCOUNTING_TIMEOUT after
NANO_QSEARCH_ACCOUNTING_WINDOW_S, default 900 s; still held, never sealed pending,
never NOT_RUN), nothing resubmitted. Each repeat or restart drives ATLAS
recover_qsearch_submission's accounting read; the stored ATLAS receipt is merged
with the ledger row's settled usage (same provider job, positive usage only) and
the OK / FAILED receipt is sealed once with usage_pending false. A DONE receipt an
older Nano sealed while usage was pending is never served as final: it is
re-derived from the settled row with identical results (compare-and-swap; the
replaced seal and usage kept in record_json["reseals"]) or answered 503
(RESEAL_MISMATCH if results would differ). FakeFez dry runs and v1 receipts
(no usage field) are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Unknown submission outcomes stay pending through ledger failures (independent review: GO, no critical/high)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ettled_usage

Recovery now takes the client view of the stored receipt from ATLAS #184's
qsearch_receipt_with_settled_usage(ledger, request_id) (the stored DONE/FAILED
receipt completed once, durably, with the row's settled usage), used only for the
same provider job; otherwise the recovered receipt stands and stays held. The
row-usage merge remains only as the fallback for ATLAS pins without the helper.
The sealed v2 usage keys stay exactly {quantum_seconds, usage_pending,
provider_sub_jobs, provider_metrics}: ATLAS's usage_settled_at and
provider_usage_at_receipt are not mapped into the receipt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…edger alone (#54 review)

Review MEDIUM 1: a FAILED (cancelled / errored / max-time) job whose usage stays 0
is still held, never sealed with final usage, but every 503 now carries what the
client can record: job_id, result, provider_status, terminal, usage_pending and
(for FAILED) reason, under ACCOUNTING_PENDING_TERMINAL (ACCOUNTING_PENDING for a
DONE job, ACCOUNTING_TIMEOUT after the window). A submitted request whose outcome
is not known yet answers SUBMITTED_PENDING with the job id when ATLAS names it.

Review MEDIUM 2: recovery first reads ATLAS's ledger-only
qsearch_receipt_with_settled_usage (no provider call, no live context, no flags),
so a settled row, including a historical re-seal, completes without GO / LIVE.
Only an unsettled row goes on to provider recovery; without the flags it answers
ACCOUNTING_NEEDS_LIVE_CONTEXT instead of ACCOUNTING_PENDING.

Also: record_json notes that usage.provider_metrics is the provider's read at job
completion (may show 0) while quantum_seconds is the settled usage, and keeps
ATLAS's provider_usage_at_receipt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Live v2 receipts sealed once with settled usage; held results answer 503 with outcome detail (accounting gate; independent review: GO)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AetherAI3
AetherAI3 marked this pull request as ready for review November 1, 2026 17:19
@AetherAI3
AetherAI3 merged commit cb6ea88 into main Nov 1, 2026
0 of 9 checks passed
This was referenced Nov 1, 2026
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