Skip to content

Fix zero-sink gateway smoke telemetry checks - #2551

Merged
HypForge merged 3 commits into
masterfrom
codex/zero-sink-smoke-contract-delivery
Oct 8, 2026
Merged

HypForge merged 3 commits into
masterfrom
codex/zero-sink-smoke-contract-delivery

Conversation

@HypForge

@HypForge HypForge commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

The Codex and Claude gateway smoke flows failed on an aggregate sink.tick span after sink work moved to per-instance dispatch. These fixtures configure no sinks.

Each flow now checks a positive daemon dispatch counter tagged with its current run and confirms that no instance export span was emitted. All capture, partition, cache, shutdown and route assertions remain and execute through the end of both flows. Associated comments and the daemon lifecycle JSDoc describe the existing behavior.

Both failures were reproduced on master. The reviewed candidate passes both complete flows, 29 focused checks, typecheck, the full suite (7,837 passed, 4 skipped) and package validation. Independent Astra review accepted the exact head with no findings and low shipping risk; executable runtime code is unchanged. Initial dependency-mismatch failures remain in the native evidence.

Native maintenance: qitem-maint-zero-sink-smoke-20261008. This correction leaves held PR #517 intact. HYP-71 must separately run both flows on its combined candidate; this PR does not claim installed-client or feature acceptance.

@HypForge

HypForge commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Zero-sink gateway smoke contract: independent review, round 1

Accepted at adfd98a04e72dda8d3be67840f359b821a027ac4. Findings: none. Independent shipping risk: low. This accepts the standalone smoke correction, not HYP71, installed-client behavior, receiver delivery or publication/landing.

Reviewer team-sink-instance-reviewer@hypforge, native node 01M4CB7HW4B4PNAMKNQQ4471HF; child qitem-zero-sink-smoke-review-r1-20261008; existing maintenance parent qitem-maint-zero-sink-smoke-20261008. Target/base 16e87910f4ed0ced387a6a6cced2a4defc281b90. Round 1 of default 2. Actual start 2026-10-08T03:45:10.801Z; checkpoint 2026-10-08T04:45:10.801Z; completed before checkpoint.

Identity and whole-candidate scope

Verified native identity, sole current assignment, prepared clean detached zero-sink-smoke-review-r1, target ancestry and tree equality with author c9f561935713ffe0fb14891da797eb4ada52a6e5. A separate owned zero-sink-smoke-review-base preserves the exact baseline. Both use the assigned task-owned declared dependencies through ignored links, including @types/node26.6.4. Root and prior review checkouts remain unchanged. No implementation or GitHub mutation occurred.

Inspected the entire three-file diff (37 additions/17 deletions), both full gateway flows and their later assertions, harness/expect JSONL handling, meter serialization, dispatch and daemon bookkeeping call sites. Read LLP0471 instance ownership and applicable review/shipping guidance. Verified 68 author artifact hashes and three committed file hashes. review-provenance.json records identity, clean state, ancestry and exact diff checks.

The runtime delta is only the stated lifecycle JSDoc replacement. Replacing that exact old paragraph with the new paragraph makes the baseline runtime file identical to the candidate. Actual runTick already calls driver.dispatch followed by requestBookkeeping. Dispatch already increments hyp_sink_ticks_total with source=daemon before enumerating handles. Instance export spans occur only for actual instance work. Thus the updated prose and zero-sink expectations match existing behavior; no runtime instrumentation or scheduling semantics are restored or changed.

Assertions and actual telemetry

Each old flow expected an aggregate sink.tick span even with no configured sinks. Each replacement now requires a positive hyp_sink_ticks_total value, source=daemon and resource.dev_run_id equal to its harness run. It separately requires no sink.export_batch spans. The metric JSONL serializer actually writes value, attributes and resource in those locations; this is not an assumption about an OTLP wire envelope. expect.metrics always returns an array. The harness gives every flow a fresh telemetry directory and run ID, sets the resource before importing the flow and flushes observability before reading it. The export absence check cannot be satisfied by another run's historical files.

My four actual runs, two before and two after, each produced two matching daemon counter points with numeric value1, zero export spans, two gateway cache.append spans, one shutdown span and two run-tagged exchange logs. Config.load spans report sink_count0; generated config contains no sinks and final status contains sinks=[] with state=stopped. The Codex route-release log is present with restart_required=true. Raw JSONL and final status files are retained under the four review-*-telemetry directories, with per-file hashes and exact run IDs in review-telemetry.json. The fixtures and their owned temporary roots were removed only after evidence capture; no owner state was used.

Static comparison confirms exactly one obsolete assertion removed and two replacements added per flow. Each has 31 original assertion call sites and 32 final call sites, including dynamic calls. All later source from cache.append onward is byte-identical. The before runs fail at the obsolete assertion, whereas the after runs execute the entire unmodified remaining flow successfully. That reaches the retained cache.append/shutdown/exchange-log checks, Codex route release and SSE log assertion. Earlier capture/query, four-row results, identity/lineage, partitions, status and shutdown sequencing checks also pass. No assertion deletion-only shortcut, extra configured sink, early successful return or adapter/lineage change was introduced.

Independently executed checks

Commands ran with isolated per-command TMPDIR roots under this evidence directory so the harness's actual JSONL could be retained. Those roots are cleaned after copying evidence. Candidate checks use the exact integrated head and declared dependency link.

Command Scope/result Evidence
npm run smoke -- gateway_codex_capture Exact base16e87910, expected exit1 at sink.tick, value=[] review-before-codex.log
npm run smoke -- gateway_claude_capture Exact base16e87910, expected exit1 at sink.tick, value=[] review-before-claude.log
npm run smoke -- gateway_codex_capture Exact candidate, exit0 through complete flow review-after-codex.log
npm run smoke -- gateway_claude_capture Exact candidate, exit0 through complete flow review-after-claude.log
npm run typecheck Exit0 review-typecheck.log
node --test test/core/llp-ref-hygiene.test.js test/core/house-style-em-dash.test.js test/core/house-style-nul-byte.test.js test/core/compare-strings.test.js Exit0, 29 pass review-focused.log
git diff 16e87910 adfd98a0 --check Exit0 review-provenance.json
Python read-only comparison/JSONL analysis Exact JSDoc-only runtime, retained assertions, telemetry and artifact hashes verified review-provenance.json, review-assertion-retention.json, review-telemetry.json

Final run IDs are smoke-gateway_codex_capture-2026-10-08T03-45-39-789Z-80357 and smoke-gateway_claude_capture-2026-10-08T03-45-39-789Z-80337. Before-run IDs and all raw record hashes remain in review-telemetry.json. The complete flows exercise a real disposable daemon, loopback upstreams, gateway capture, cache/query and shutdown, while client traffic remains synthetic. They do not run installed Codex/Claude clients.

No broad full-suite/package repeat was needed for this smoke-only executable delta and byte-identical author/integration tree after the focused checks and complete before/after flows passed. The author's hashed final npm test (7,837 pass/four skip) and package result (1,170 entries) remain separately attributed evidence, not my executions.

Preserved dependency failures

The author's inherited pilot tree resolved @types/node26.5.0 against declared26.6.4. Original typecheck/package failures on unchanged Socket.server, baseline reproduction and the three initial full-suite failures/eight skips remain in dependency-disposition.json and the original logs. The author records baseline typecheck success and final full success with task-owned declared versions. I verified the final dependency record and used the declared tree for all reviewer before/after runs and my successful typecheck. I did not independently rerun the historical mismatched-dependency suite or claim every initial failure's exact cause was newly proven. Those failures are not erased by the final green evidence.

CPU/memory and independent shipping risk

No CPU or memory concern found in changed or affected paths. Each smoke reads one existing metrics array and scans it with some; it filters the already-read traces for export absence. Work and memory are proportional to short disposable fixture telemetry, around165 KB Codex and219 KB Claude total JSONL in my successful runs. The existing harness reads whole JSONL files; this is fixture-scale evidence, not a production bounded-history claim. No extra waits, runtime allocations, persistent arrays, timers, queues or uptime-dependent work are added. The runtime file's executable bytes are unchanged.

Low risk at the exact candidate/base. The affected users are developers and CI running these two smoke flows; production scheduling/capture behavior is unchanged. The possible unintended harm would be making a broken smoke pass by weakening coverage or accepting unrelated telemetry. The focused safety proof directly reproduces old failures, validates positive current-run daemon evidence and zero real fixture sinks, proves later assertions are retained, and executes both full corrected flows through their final assertions. It also verifies runtime code equality outside one JSDoc paragraph. This supports the classification independently of a general green suite.

Rollback is a simple source revert with no configuration/state/schema migration or user-data effect. There is no installed-client, external receiver, production health, GitHub CI or landing claim. HYP71 must separately integrate the accepted correction and run both full flows on its exact combined candidate. PR517's held-quiescent adapter/lineage scope and receiver/installed feature holds remain intact; this review does not clear them.

Return to the directly verified live steward-owned parent, currently blocked on this review child. The original steward retains any correction custody, and the owner retains publication, current-target/CI/policy checks and delivery decisions. No slot release or new review extension is granted. Retain both reviewer worktrees for supported continuation.

@HypForge HypForge added neutral:adopted Adoption completion record: merged while carrying neutral:adopt (LLP 0031) neutral:approved neutral reviewed this and holds it for a maintainer merge (own or adopted PR; LLP 0025/0030) labels Oct 8, 2026
@HypForge
HypForge marked this pull request as ready for review October 8, 2026 03:57
@HypForge
HypForge added this pull request to the merge queue Oct 8, 2026
Merged via the queue into master with commit f668cb6 Oct 8, 2026
8 checks passed
@HypForge
HypForge deleted the codex/zero-sink-smoke-contract-delivery branch October 8, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

neutral:adopted Adoption completion record: merged while carrying neutral:adopt (LLP 0031) neutral:approved neutral reviewed this and holds it for a maintainer merge (own or adopted PR; LLP 0025/0030)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant