Skip to content

Commit 434af30

Browse files
Elon Muskclaude
andauthored
docs(objectql): archiveObject's triple note points at the #10643 parse-time refusal (#11007)
The `retention` + `ttl` + `archive` paragraph in the `archiveObject` docblock still called #10527 an open question and warned about a shape the spec no longer accepts. #10643 (5649efb) decided it: `LifecycleSchema` refuses that triple unless `ttl.field` is `created_at` and `ttl.expireAfter` equals `retention.maxAge` (itself pinned equal to `archive.after`), so every triple reaching this method selects the same column at the same declared instant on either branch. The rewrite keeps the still-live half: the equality is enforced in `packages/spec` and re-checked nowhere in this file, so widening that accept-set brings the union-vs-refusal question back to this line. Comment-only; no executable line changes. Claude-Session: https://claude.ai/code/session_019yDEhPBC3tcGkW9bkce1HM Co-authored-by: Claude <noreply@anthropic.com>
1 parent 490879a commit 434af30

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

packages/objectql/src/lifecycle/lifecycle-service.ts

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,13 +1198,26 @@ export class LifecycleService {
11981198
// author has not decided yet — against the retain-first posture that makes
11991199
// this method refuse to hot-delete anything the cold store has not taken.
12001200
//
1201-
// ⚠️ Deliberately NOT decided here: `retention` declared beside `ttl` +
1202-
// `archive`. The ttl cutoff selects, so the age window (`archive.after`,
1203-
// which the spec pins equal to `retention.maxAge`) no longer separately
1204-
// bounds the hot store for that triple. Whether the Archiver should union
1205-
// the two windows, or the triple be refused at parse time (a
1206-
// `packages/spec` accept-set question, outside this card's fence), is
1207-
// #10527 rather than a choice this diff makes silently.
1201+
// [#10643] `retention` declared beside `ttl` + `archive`: once an open
1202+
// question at this line (#10527), since decided — and decided at parse
1203+
// time rather than here. `LifecycleSchema` (`packages/spec`, the
1204+
// superRefine on the lifecycle block) refuses that triple unless the ttl
1205+
// restates the age bound exactly: `ttl.field` must be `created_at` and
1206+
// `ttl.expireAfter` must equal `retention.maxAge` — which the alignment
1207+
// refine beside it already pins equal to `archive.after`. So every triple
1208+
// that reaches this method arrives narrowed to that one shape, and on it
1209+
// the selection below reads the same column at the same declared instant
1210+
// whichever branch it takes; the hazard the old note raised (the ttl
1211+
// cutoff selects, so the age window no longer separately bounds the hot
1212+
// store) is no longer a shape the spec accepts.
1213+
//
1214+
// Still load-bearing: that equality is enforced in `packages/spec` and
1215+
// re-checked nowhere in this file. Widening the triple accept-set there
1216+
// puts the original question — union the two windows, or keep refusing —
1217+
// straight back on this line, so it is not a spec-local change. Which
1218+
// WINDOW governs is a separate leg either way: with `ttl` declared it is
1219+
// the `expireAfter` override key that applies, not `maxAge` (see the
1220+
// #10528 block below).
12081221
const dueField = lc.ttl ? lc.ttl.field : 'created_at';
12091222

12101223
// [#10528] WHICH WINDOW IS DUE — resolved through ADR-0057 P4 governance,

0 commit comments

Comments
 (0)