Files
alkstore/tasks/release-contract-window-close.md
T

99 lines
4.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: release-contract-window-close
name: Class-1 window's last dispositions — the wave-6 recorded observations
status: pending
depends_on: []
scope: moderate
risk: medium
impact: project
level: implementation
tags: [wave-8, contract, adr]
---
## Description
ADR-017 §2's class-1 amend-in-place window **terminates permanently at
the core crate's first release** — this pre-release pass is the last
chance to land the contract-text dispositions the wave-6 review gate
recorded for it (`tasks/review-wave-6.md` §Recorded findings). Land
each as either contract/ADR text (a class-1 amendment, legal only
now) or an explicit documented-tolerance record — no silent divergence
survives into the release:
1. **Multi-thread publish→wake ordering tolerance** (streams): offset
allocation precedes insert+wake, so two concurrent publishes can
complete out of offset-allocation order and a subscriber's cursor
can skip an event whose wake fires later (the event is never lost
from the log). Nothing contract-side pins wake-fire order vs offset
order; the SQL engines share the shape in principle. Decide:
document as a tolerated ordering (where — core-contract.md's
delivery-guarantee table is the natural home) or amend as ADR text
(wake order per stream = offset order — the heavier path, and one
the mem engine's current-thread posture doesn't exercise). **Raise
the recommendation with the user before landing** — this is a
consumer-visible guarantee decision, exactly the class AGENTS.md
says to escalate.
2. **ADR-023 §2 domain-table classifications** (all three engines
uniform; the table is the contract's numeric-domain record):
`heartbeat(extend)`'s seconds-shaped argument (boundary-total
today: saturating/SQL add — a negative shortens/voids the claim);
`save_offset`'s argument (negatives accepted, stored, reads resume
forward; monotone no-op below the checkpoint); and pick the right
home for each.
3. **`EventReceiver::try_recv`'s closed shape**: `Err(Closed)`
(mirrors `WakeReceiver::try_recv`, ADR-008 §3) — mem-test-pinned
today; ADR-021 §5 pins only `recv()`'s arms. Annotate the pinned
shape.
4. **`get_job` id-global vs queue-scoped prose**: core-contract.md's
"queue-scoped" handle phrasing reads as a filter but the uniform
behavior is id-global lookup (`get_job_tx` *is* queue-filtered).
Fix the prose so the contract says what all three engines do.
5. **Mem-arithmetic transplant note**: dispose the recorded
one-owner-rule observation (the mem copies are byte-level
transplants of the SQLite implementations; equivalence is
suite-pinned three-way) — likely a no-action disposition recorded
in the task Notes, but the record should say so explicitly.
Every landed amendment follows the ADR amendment discipline (dated
in-place annotation citing this pass; the suite's stamps accumulate if
a row's cited § text changes meaning). Items 2–3 may add suite stamp
citations — check whether any existing row's stamp needs the
accumulation.
## Acceptance Criteria
- [ ] Item 1 decided with the user (documented-tolerance vs ADR
amendment), landed in the chosen home, decision recorded
- [ ] ADR-023 §2 table carries the `heartbeat(extend)` and
`save_offset` classifications (or the task records why a
different home was chosen)
- [ ] `EventReceiver::try_recv`'s closed shape pinned in contract text
- [ ] core-contract.md's `get_job` prose matches the uniform
id-global/`get_job_tx`-filtered behavior
- [ ] The mem-arithmetic observation's disposition recorded
- [ ] Every landed amendment dated + cited; affected suite stamps
checked for accumulation; `taskgraph validate` + workspace gates
green (docs-only changes expected — code changes only if the
user opts to amend wake-ordering into an enforced guarantee,
which would be a follow-up, not this task)
## References
- docs/architecture/decisions/017-contract-versioning.md §2 (the
class-1 window and its first-release termination)
- tasks/review-wave-6.md §Recorded findings (the observations this
task disposes)
- docs/architecture/core-contract.md (delivery-guarantee table;
§Verification backlog)
- docs/architecture/decisions/023-fourth-review-round.md §2 (the
domain table)
- docs/architecture/decisions/021-tx-reads-and-value-shape-fixes.md §5
(the receiver arms text)
## Notes
> To be filled by implementation agent
## Summary
> To be filled on completion