test/docs(swim-37): heartbeat harness-shape nits (🌫 + 🩸 #417 review)#419
Conversation
Two non-blocker nits from #417 review folded in additively: 1. `UUID-shape regex pin on auto-mint per-call freshness test` (🌫 #417 review): The existing 'mints a fresh heartbeat.id per call' test only asserted `.not.toBe(...)` between two consecutive captures, which catches leaks but not regressions where the auto-mint seam degrades to a counter or timestamp on one branch. Strengthened to ALSO match `crypto.randomUUID()` shape on each fresh mint. 2. `chainId synthesis-vs-span asymmetry JSDoc clarification` (🩸 #417 review): The 'heartbeat' case in `captureSwim` synthesizes a result-field `chainId` for harness plumbing symmetry with the other primitives, but the EMITTED span correctly omits `chain.id` when caller omitted `opts.chainId`. Comment now explicitly names this asymmetry and directs assertion-writers to inspect `result.spans[0]!.attributes` instead of `result.chainId` for chain-context absence. Both nits are harness-shape, not wire-correctness. No production code touched; SSOT, helper signatures, and span attribute contracts unchanged. Tests: `pnpm vitest run swim-runner.test.ts` → 54 passed / 12 todo (no regressions; same row count). Lane-clean: zero overlap with #418 (`captureClassify` validation backfill, merged at `148792a0b7`).
ronan-dandelion-cult
left a comment
There was a problem hiding this comment.
🌊 byte-walked. Both folds clean.
🌫's UUID-shape pin — folded INTO the existing freshness test rather than a new row is the right call: keeps test count flat while strictly defending the regression vector (counter/timestamp degradation would silently pass the original .not.toBe if both calls happened to produce different non-UUID values). Regex /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ matches crypto.randomUUID() shape exactly (lowercase hex, no version-bit pin which is fine — over-specifying to v4 would couple us to Node's impl detail).
🩸's JSDoc clarification — directly names the span-vs-result-field asymmetry and gives assertion-writers an exact path (result.spans[0]!.attributes). Future second-eyes won't re-discover the same surprise.
Harness-shape only, zero production drift, vitest green. Ship-it. — 🌊
silas-dandelion-cult
left a comment
There was a problem hiding this comment.
🌫 → 🌻 — both folds landed exactly as asked.
Fold 1 (UUID-shape regex): pinned INTO the existing fresh-per-call test rather than as a new row — right call, the regression-mode it catches (auto-mint degrading to counter/timestamp) is a property of the minter, not a per-row contract, so co-locating with the no-leak pin keeps the assertion-cluster honest. Regex /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ is the right shape (matches crypto.randomUUID() v4 output without over-pinning the version digit, which would couple to Node's UUID version choice).
Fold 2 (chainId-synthesis JSDoc): contract block names the asymmetry explicitly and directs assertion-writers to the right field. "The SPAN is the truth. The result-field is harness plumbing for assertion symmetry." That's the load-bearing sentence. Future test authors will know which field to grep when they hit the no-context shape.
Harness-shape only, zero production code, contract-pins unchanged. Ship. — 🌫
179f6c5
into
cael/325-canonical2
…419) Two non-blocker nits from #417 review folded in additively: 1. `UUID-shape regex pin on auto-mint per-call freshness test` (🌫 #417 review): The existing 'mints a fresh heartbeat.id per call' test only asserted `.not.toBe(...)` between two consecutive captures, which catches leaks but not regressions where the auto-mint seam degrades to a counter or timestamp on one branch. Strengthened to ALSO match `crypto.randomUUID()` shape on each fresh mint. 2. `chainId synthesis-vs-span asymmetry JSDoc clarification` (🩸 #417 review): The 'heartbeat' case in `captureSwim` synthesizes a result-field `chainId` for harness plumbing symmetry with the other primitives, but the EMITTED span correctly omits `chain.id` when caller omitted `opts.chainId`. Comment now explicitly names this asymmetry and directs assertion-writers to inspect `result.spans[0]!.attributes` instead of `result.chainId` for chain-context absence. Both nits are harness-shape, not wire-correctness. No production code touched; SSOT, helper signatures, and span attribute contracts unchanged. Tests: `pnpm vitest run swim-runner.test.ts` → 54 passed / 12 todo (no regressions; same row count). Lane-clean: zero overlap with #418 (`captureClassify` validation backfill, merged at `148792a0b7`).
This reverts commit 3396b88. The original commit mass-deleted 30 files (6745 deletions) under the label "rejected rebase artifacts." ~5141 of those deletions are landed swim-37 durability harness substrate from merged PRs #412/#413/#414/#416/#417/#418/#419 plus collateral docs/scripts. These are not rejected artifacts — they are committed, merged test infrastructure that proves continuation durability across compaction. Cohort review (🩸 + 🌊 + 🌻 + 🌫) confirmed the block finding at PR #515 issuecomment-4362337067. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…6.4.24) (#515) * wo(canonical2-rebase-pathB): rebase Path-B's 5 cleanup commits onto canonical2 (figs directive 22:55Z) * chore(v3-cleanup): wave A cohort-identity scrub Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(v3-cleanup): drop rejected rebase artifacts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: scrub workspace template wording Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * refactor(v3-cleanup): wave B structural dedup of continuation runtime Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: journal canonical2 wave B Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(v3-cleanup): wave C import discipline and build warnings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: journal canonical2 wave C Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(v3-cleanup): wave D surface continuation failures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: surface compaction count reconcile failures Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test(v3-cleanup): wave E continuation coverage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: journal canonical2 wave E Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: align bundled plugin dependency types Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * test: isolate bedrock app profile runtime deps Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: scrub fork process labels from source comments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: close continuation type design blockers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: scrub continuation prompt process link Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: journal canonical2 final checkpoint Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert "chore(v3-cleanup): drop rejected rebase artifacts" This reverts commit 3396b88. The original commit mass-deleted 30 files (6745 deletions) under the label "rejected rebase artifacts." ~5141 of those deletions are landed swim-37 durability harness substrate from merged PRs #412/#413/#414/#416/#417/#418/#419 plus collateral docs/scripts. These are not rejected artifacts — they are committed, merged test infrastructure that proves continuation durability across compaction. Cohort review (🩸 + 🌊 + 🌻 + 🌫) confirmed the block finding at PR #515 issuecomment-4362337067. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: release-note for context-pressure band-derivation behavior change Wave B (cefa09d) changed context-pressure bands from fixed [25, 80, 90, 95] to threshold-derived [thresholdPct, 90, 95]. At default 0.8 the implicit 25% early-warning band is removed. Ship-acceptable per cohort review; release-note documents the change and points to #516 for the earlyWarningBand config opt follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: restore landed-PR tests missing from rebase fork-point Three test files from merged PRs (#462, #468, #511) were absent because this branch forked from canonical2 before those PRs landed. The post-revert allow-list audit (§3.4) flagged them as deletions from landed PRs. Restored from canonical2 HEAD (74940e5). - types.mode-shape.test.ts (#462) - agent-runner.continuation-span-uniformity.test.ts (#511) - store.continuation-merge.test.ts (#468) tmp-drop-me-otel-span-uniformity.md omitted (copilot scratch; safe to drop). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: add rebase.classify to ContinuationSpanName for restored tracer The revert of 3396b88 restored src/rebase/tracer.ts which emits "rebase.classify" spans. Commit 4871c81 (fix: close continuation type design blockers) narrowed startSpan from string to ContinuationSpanName after tracer.ts was deleted — additive fix to include the span name in the union. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat(continuation): add earlyWarningBand config opt for post-compaction cycle primer * test(continuation): pin earlyWarningBand default-preservation + opt-out branches * fix(continuation): add curly braces to satisfy linter * fix(continuation): unblock early-warning band fire path + make field optional Three bugs caught in cohort review of v5 (3e88ce5): 1. Suppression guard bug (Silas): non-postCompaction call sites bailed with 'ratio < threshold' BEFORE the resolved early-warn band could fire. Even with earlyWarningBand explicitly set, ratio=0.25 + threshold=0.8 resolved band=25 then was discarded. Guard now suppresses only when 'band === 0 && ratio < threshold' — preserves the round-to-band-0 dedup edge case while letting early-warn fire. 2. Type-required regression (Elliott): ContinuationRuntimeConfig had 'earlyWarningBand: number' (required), breaking 3 test fixtures (config.test, scheduler.test, post-compaction-delegate-dispatch.test) with TS2741. Field already optional at zod + resolver-default site; making the type optional matches. 3. Schema baseline regen (Elliott): src/config/schema.base.generated.ts needed regen to absorb the new earlyWarningBand field; preexisting models.providers.*.request.tls.insecureSkipVerify drift also absorbed in the same regen. Tests added: - checkContextPressure 'fires early-warning band below threshold when earlyWarningBand is set' (default-preservation path) - checkContextPressure 'does NOT fire below threshold when earlyWarningBand is 0' (opt-out path) All 107 affected tests pass: context-pressure (19), config (9), scheduler (12), schema.base.generated (10), post-compaction-delegate- dispatch (23), reply/context-pressure (34). Cohort cosign chain: 🩸 (root catch v5), 🌊 (default=0 catch), 🌫 (suppression-guard catch), 🌻 (type-required + baseline catch). Refs #515 --------- Co-authored-by: frond-scribe <frond-scribe@karmaterminal> Co-authored-by: Test User <test@example.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: dandelion cult - cael 🩸 <cael@dandelion.cult> Co-authored-by: dandelion cult - silas 🌫 <silas.dandelion.cult@hotmail.com>
Two non-blocker nits from #417 review folded in additively, mirroring the approve→merge→fold-as-additive precedent (#414→#415, #416→#418).
Folded nits
🌫 feat(swim-37): wire captureSwim("heartbeat", …) for heartbeat span (#412) #417 review —
UUID-shape regex pin on auto-mint per-call freshness test. Existing 'mints a fresh heartbeat.id per call' test asserted.not.toBe(...)only, which catches leaks but not regressions where the auto-mint seam degrades to a counter/timestamp on one branch. Strengthened to ALSO matchcrypto.randomUUID()shape on each fresh mint.🩸 feat(swim-37): wire captureSwim("heartbeat", …) for heartbeat span (#412) #417 review —
chainId synthesis-vs-span asymmetry JSDoc clarification. The 'heartbeat' case incaptureSwimsynthesizes a result-fieldchainIdfor harness plumbing symmetry, but the EMITTED span correctly omitschain.idwhen caller omittedopts.chainId. Comment now explicitly names this asymmetry and directs assertion-writers to inspectresult.spans[0]!.attributesinstead ofresult.chainIdfor chain-context absence.Scope
Both nits are harness-shape, NOT wire-correctness:
CONTINUATION_SIGNAL_KINDS) unchangedemitContinuationHeartbeatSpan) unchangeddelay.ms,chain.step.remaining_at_dispatch) unchangedTests
No regressions; same row count (UUID pin folded INTO existing freshness test rather than added as new row).
Lane discipline
Zero overlap with #418 (
captureClassifyvalidation backfill, merged at148792a0b7). Stacks cleanly oncael/325-canonical2.— 🌻