Repository navigation
docs(adr): ADR-0074 Amendment 3 (PROPOSED), close every live day from the archive, unattended, whole allow-list (#538) - #539
Merged
Conversation
…the archive (#538) Design only. Proposes retire-and-import for closed days published as live slices in cycles mode (A2.3 reassessment per slice, then the archive day as dt=<day>/seg=000000.000), with the plan, refusals, overlap rule, relation to the continuous session and the open items for the maintainer. Changes no code, governance file or data. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#538) Records the maintainer's requirement of 2026-10-27: every instrument of the allow-list, automatic, every day closed. Adds A3.12 (selection by rule, three outcomes, the guards that replace the reviewed date plan, what it does not do) and rewrites the open items on instruments, trigger and gap records. Design only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… fallback (#538) The daily run closes the previous day at 12:00 UTC. A slice day is closed when it has ended and the live checkpoint is bound to a later day (replaces the 24-hour margin for slice days). When the import is refused the day is marked invalid with the existing A2.3 reassessment and retried by the next run; a failed verification retires the imported partition too. Design only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ce (#538) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…o a JSON-lines log (#538) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…not by long-gap records (#538) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…y an archive closure (#538) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADR-0074 Amendment 3 (PROPOSED): close every live day from the archive, unattended, for the whole allow-list
Refs #538. Design only: one file,
docs/decisions/ADR-0074-multi-instrument-bybit-linear-trades-v1.md(the status header and a new Amendment 3, A3.1 to A3.13). No code, no test, no governance file, no data.Maintainer's requirement (2026-10-27), which shapes the proposal: every instrument of the allow-list (BTCUSDT, ETHUSDT, SOLUSDT, XRPUSDT, DOGEUSDT), automatic, and every day closed well, so that no day is repaired by hand again.
What it proposes
cyclesmode the pause between two slices is not covered and not reconciled. Measured onhomelab(operator-reported, read-only): 2026-10-24 has 3,327 slices, 3,326 gaps, 28,718 s uncovered (33.2%); 2026-10-25 has 3,333 gaps, 29,681 s (34.4%). 3,324 of the 3,326 gaps of 10-24 are at most 30 s; the two longer ones are consistent with restarts (not checked against logs). The share of trades actually lost on those days is not measured (no archive file on the server); [design] live: publication supersedes earlier cycles and the loop loses ~27% of trades (ADR-0075) #504's 27.2% is the only measured loss. The 2026-10-26 manual replacement is recorded as evidence, not as a precedent.valid -> invalid, nothing deleted), import the archive day asdt=<day>/seg=000000.000through S13/S14 with the A2.2 importer variant widened to slices, verify. Conservation by(exchange_ts, trade_id)with full-field equality; refusals for a checkpoint binding, awriting/closedslice, a bridge slice without its neighbour, an uncontained gap record, an overlap, and a day that has nothing to repair.lock_timeoutand the closure yields and resumes at the next run; one object per transaction with pauses between them; download, parse and certification hold no catalog lock and run under CPU/memory limits and lower priority; a wall-clock limit per run. The publication latency of the service during a closure is a required measurement, with a bound; not assumed.O02) completes a day as it happens; the system asked for is the two together. WithO02running, the run verifies and replaces nothing.DELETE, a day-level retirement, a REST reconciliation after every cycle (window of 1,000 trades: about 36 to 77 s), an operator-only run per reviewed plan, an atomic replacement.Decided by the maintainer (2026-10-28)
A day not closed after 23 hourly attempts is marked invalid and abandoned (no later run takes it;
reopenline to retry); the signals are lines appended to a JSON-lines log (also the record of attempts and abandoned days; a lost log only gives more attempts, never changes data). This removes the per-run maximum of days and the severity threshold. The validity of a day is decided only by the archive verification within the 23 attempts; long-gap records do not decide it and ADR-0044 is not amended.Still open (A3.10)
Whether the Bybit archive file of the previous day exists at 12:00 UTC (not measured; the hourly retry absorbs a late file), retention of the 2026-10-26 directories and dump (the retired slices of a day closed from the archive carry no retention duty, maintainer 2026-10-28; the run deletes nothing), whether a complete live day may ever be replaced (proposed never), and, outside this amendment, whether the explicit-gap state of the live service caused by an open long-gap record should ever end.
Checks
python tools/workflow.py preflight: compileall,git diff --check, package boundaries, governance boundary: all pass.47ad612.Not done
Acceptance; the amendment of ADR-0044; governance registration of the atoms in
SCOPE.md(a separate governance issue, as #518 for #515); the implementation; any change of production data; the first run; the switch of the service tocontinuous.🤖 Generated with Claude Code