Skip to content

[#14478 stack 3/6] kernel/: the 14 remaining duration keys carry their unit in the key name — ADR-0087 conversions with readers (runtime-emitted measurements included) #15678

Description

@os-project-manager

Part of #14478 — follow-on card 3 of 6, filed by the domain:spec seat (session_01M59rPZZFzqhfMUPFqqZTkf, 2026-09-05T02:55Z) under the maintainer ruling B on #14478 (5548763981, batch #43, 「同意」). Dispatched after stack cards 1/6 and 2/6 have PRs to stack on.

Ruling text this card executes (verbatim)

Convert the ~30 authored config durations and the ~16 runtime-emitted measurements (they are read by humans and agents even if not authored […]).

(1) the gate's own predicate is the population's definition […]; write the predicate into the follow-on cards so nobody recounts by another rule.

The predicate

Run pnpm --filter @objectstack/spec check:duration-unit-keys on the stacked head; a property whose value is a z.number() / z.int() / z.coerce.number() chain and whose .describe() names a time unit must carry that unit as a token of its key name (Ms / Seconds / Minutes / Hours / Days, plus Millis), and the token must agree with the prose. ⛔ The list below is the gate's own output on e68ae2b58, filtered to src/kernel/** minus card 1/6's four instants (context.zod.ts:106 startTime, service-registry.zod.ts:69 registeredAt, :266 createdAt, startup-orchestrator.zod.ts:98 timestamp); re-derive on the stacked head before editing.

site (e68ae2b58) key describe unit gate's suggested name class
src/kernel/events/handlers.zod.ts:85 retention days retentionDays authored
src/kernel/events/queue.zod.ts:152 retention days retentionDays authored
src/kernel/package-upgrade.zod.ts:124 estimatedDuration seconds estimatedDurationSeconds emitted
src/kernel/plugin-lifecycle-advanced.zod.ts:181 uptime ms uptimeMs emitted
src/kernel/plugin-lifecycle-advanced.zod.ts:186 responseTime ms responseTimeMs emitted
src/kernel/plugin-security-advanced.zod.ts:352 timeout ms timeoutMs authored
src/kernel/plugin-security-advanced.zod.ts:586 tokenExpiration seconds tokenExpirationSeconds authored
src/kernel/plugin-security-advanced.zod.ts:605 retention days retentionDays authored
src/kernel/plugin-security-advanced.zod.ts:697 responseTime hours responseTimeHours authored
src/kernel/plugin-security.zod.ts:515 resolvedIn ms resolvedInMs emitted
src/kernel/plugin-versioning.zod.ts:384 duration ms durationMs emitted
src/kernel/startup-orchestrator.zod.ts:37 timeout ms timeoutMs authored
src/kernel/startup-orchestrator.zod.ts:149 duration ms durationMs emitted
src/kernel/startup-orchestrator.zod.ts:196 totalDuration ms totalDurationMs emitted

The class column is the seat's reading; the dev decides each from the schema's producer (authored ⇒ D2 conversion with a retiredKey() tombstone and a RETIRED_KEYS_BY_MAJOR row where the key is on the authorable surface; emitted ⇒ semantic ADR-0087 entry, the emitter and every reader renamed in the same PR at the same magnitude).

Execution notes

  • Readers moved by TYPE (grep the schema's inferred type consumers across every workspace package, then the bare key literals), the feat(spec)!: duration-shaped number keys carry their unit in the key name — no-baseline gate + seven ADR-0087 renames (timeoutMs, ttlSeconds/ttlMs, *TimeoutSeconds) #15626 fix-lap lesson; liveness ledgers, forms, i18n bundles, docs and skills/** prose updated where they name a key (a skills/** hit makes the PR governed: keep it).
  • Stacked on card 2/6's head; draft PR, base = that branch; body first line Part of #14478, this card named without a closing keyword. ⛔ Never Fixes #14478.
  • Clause-②: yesneeds:contract-review on PR and card at creation. Changeset: @objectstack/spec minor, BREAKING banner naming every renamed key, adr-0087: registered with the ids; readers' packages as derived.
  • packages/spec/src/migrations/registry.ts is written by this stack only; serial order 2 → 3 → 4 → 5 → 6.

Related: #14478 · PR #15626 · stack 1/6 · stack 2/6.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions