Uh oh!
There was an error while loading. Please reload this page.
fix(spec): IJobService JSDoc names sys_job_run as job run history, not the audit trail (#9673) - #9738
Conversation
…t the audit trail (#9673) `packages/spec/src/contracts/job-service.ts` called the storage `replay()` and `JobRunOutcome.reason` write to "the execution audit trail" / "an audit surface" in three spots. The binding #9633 ruling: `sys_job_run` is job run history, not the audit trail — `sys_audit_log` is the audit surface, with its own opt-in, writer and retention. Wording only; `reason?`, `replay?()` and their runtime behavior are unchanged. `replay`'s JSDoc also gains the caveat #9673 suggested: recording anything durable depends on an adapter that persists run history at all (e.g. `DbJobAdapter`'s `recordRuns` option), since #9633 made that conditional where the prose previously read as unconditional. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016D9wdJR14KKCxz1WgdAzcw
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not seeCoarse fallback — 115 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 6e7df38d9764d664eecb4295442b33976c94f016 && git checkout 6e7df38d9764d664eecb4295442b33976c94f016
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin e196c6a9baa8684c14e5e72545c8009f98a9ed14 ae3240ea3567d634d972bf34b06d27aa33a8d887 && git checkout -B drift-repro e196c6a9baa8684c14e5e72545c8009f98a9ed14 && git merge --no-ff ae3240ea3567d634d972bf34b06d27aa33a8d887
node scripts/docs-audit/affected-docs.mjs --json e196c6a9baa8684c14e5e72545c8009f98a9ed14
|
Fixes#9673
What
packages/spec/src/contracts/job-service.tscalled the storage written byreplay()andJobRunOutcome.reason"the execution audit trail" / "an auditsurface" in three spots. The binding #9633 ruling:
sys_job_runis job runhistory, not the audit trail —
sys_audit_logis the audit surface, withits own opt-in, writer and retention. This PR fixes the wording; it changes
no behavior.
Three spots fixed (grepped the whole file for "audit" — these were the only
sys_job_run-pointing instances):JobRunOutcome.reasonblock-comment description: "free text for an auditsurface" -> "free text for run history"
JobRunOutcome.reasonfield JSDoc: "for the audit trail" -> "for job runhistory"
IJobService.replay?()JSDoc: "records that this run is a replay in theexecution audit trail" -> names
sys_job_runas job run history vs.sys_audit_logas the audit surface, and adds the caveatIJobService.replay's spec JSDoc callssys_job_run"the execution audit trail" — the exact conflation the #9633 ruling rejected #9673 suggested —recording anything durable depends on an adapter that persists run history
at all (e.g.
DbJobAdapter'srecordRunsoption), sinceDbJobAdapter.replay()writes its syntheticsys_job_runrow regardless ofrecordRuns— an operator who switched run history off still accumulates replay rows #9633 made thatconditional where the prose previously read as unconditional.
Out of scope
packages/platform-objects/src/audit/sys-job-run.object.ts:32— thesys_job_runobject's owndescriptionfield says "Background jobexecution audit trail" (same conflation, user-facing Studio copy this time).
Outside this PR's one-file scope per dispatch; filed as #9735.
Regeneration
gen:schema,gen:openapiandgen:docswere run (products-follow-source);none produced a diff —
contracts/*.tsholds hand-written TS serviceinterfaces, not
.zod.tsschemas, so this JSDoc-only change doesn't feed anygenerator.
check:generatedandcheck:docsboth pass, re-verified at headae3240e.Tests
Full command output is in the report comment on #9673. Summary:
@objectstack/spectypecheck clean;
vitest run413 files / 10972 tests passed; all locallyderived gates (
node scripts/pm/dispatch-gates.mjs) green at headae3240e.Generated by Claude Code
Generated by Claude Code