Skip to content

docs(kernel): point the runtime-services index at the audit slot's real registrant - #9605

Merged
os-steve merged 1 commit into
mainfrom
claude/issue-9588-runtime-services-index-seam
Aug 18, 2026
Merged

docs(kernel): point the runtime-services index at the audit slot's real registrant#9605
os-steve merged 1 commit into
mainfrom
claude/issue-9588-runtime-services-index-seam

Conversation

@claude

@claudeclaudeBot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Fixes#9588

content/docs/kernel/runtime-services/index.mdx:46 listed the canonical source for the audit slot as packages/services/service-settings/src/settings-service.types.ts. That is the same wrong seam PR #9587 removed from the page this index links to, so after that PR lands the two files contradict each other for one slot.

Evidence, verified in this worktree against origin/main

  • The wrong target.settings-service.types.ts:163 declares SettingsAuditSink, whose method is record(entry). It is constructor-injected: settings-service.ts:578 takes it as a ctor parameter, :531 holds it as private audit?, and :1459-1461 calls this.audit.record({ ... }) inside a try after a settings write lands. Nothing registers it as a service.
  • The real registrant.packages/plugins/plugin-audit/src/audit-plugin.ts:117-118 runs ctx.registerService('audit', createAuthEventAuditSink({ ... })). Canonical source packages/plugins/plugin-audit/src/auth-event-audit.ts, which declares AuthEventAuditSink at :112 with exactly one method, recordAuthEvent(event) at :118, produced by createAuthEventAuditSink at :153.
  • Spot-check of the two-line registration. A single-line grep -rn "registerService(\s*'audit'" over packages/ returns zero hits — the call spans two lines. A multiline sweep (rg -U --multiline-dotall) over the same tree returns the site above and confirms it is the only production registrant of the slot; the same sweep found each of the other eight slots' registrants, which is the positive control that the pattern works.
  • No competing contract.packages/spec/src/contracts/ has no audit contract file, so the plugin implementation is the canonical source there is.

What changed

One entry repointed, and the displaced type kept reachable rather than dropped:

  • - Audit bridge: .../settings-service.types.ts becomes - Audit: .../auth-event-audit.ts. The word bridge goes with it — it is the word that made a constructor-injected settings sink read as the kernel seam, and every other row on the list is named for its slot.
  • A Not this: the settings audit sink callout under the list names SettingsAuditSink, gives its real source, says it is constructor-injected and never resolved from the slot, and notes the resolved object exposes recordAuthEvent and not record. This mirrors the reconciliation PR docs(kernel): document services.audit as the slot it actually is #9587 added to audit-service.mdx instead of swapping the pointer silently — the index is precisely where the two get conflated, so removing the wrong pointer without naming what it used to mean would re-open the same trap for the next reader.

Documentation only. No runtime change: no alias was added and nothing was re-registered to make the old pointer true.

Whole-page pointer sweep

Every canonical-source pointer on the page was checked against the real registrant, not only the one the card names. All nine target files exist, and each per-slot page's own canonical source agrees with its row here — the audit row was the only pointer that disagreed with its own target page.

Two drifts turned up that are not fixed here and are filed as #9604 instead: the chapter list omits services.sms although that page exists and its slot is registered, and the Source-of-Truth list carries a Security row for which this chapter has no page. Both reach past this file — content/docs/kernel/index.mdx carries the same omission — so patching only this page would create a new disagreement between the two index pages.

One further observation is already on record and was not re-filed: within this chapter nothing states that services.storage is notation for the really-registered key file-storage (storage-service-plugin.ts:237; content/docs/kernel/contracts/storage-service.mdx:12 gives the real name). #9590 already records that the accessor-to-slot mapping lives only in an audit note and proposes declaring it somewhere a check can read. This page is independent confirmation of that entry rather than a second card.

Gates

Derived from the changed path after the final commit with node scripts/pm/dispatch-gates.mjs content/docs/kernel/runtime-services/index.mdx, then run at 981293858:

GateResult
check:docs-audit-scopeOK — scope in sync, 179 hand-written docs
check:docs-redirectsOK — 92 entries, 98 chain probes
check:role-wordOK — 43 baselined files, no new occurrences
check:nul-bytesOK — 6170 text files, no raw control bytes
spec check:empty-stateOK — all classified
spec check:livenessOK
spec check:strictness-ledgerOK
spec check:variant-docsOK — 18 unions, 8 governed

check:nul-bytes is owed on any edit and was added to the derived set. No package build or test is implicated: the diff is one MDX file.

Publishes nothing, so this PR carries skip-changeset rather than a changeset.

Generated by Claude Code


Generated by Claude Code

…al registrant
`content/docs/kernel/runtime-services/index.mdx` listed the "Audit bridge"
canonical source as `packages/services/service-settings/src/settings-service.types.ts`.
That file declares `SettingsAuditSink`, a constructor-injected sink that
`service-settings` holds directly (`settings-service.ts:578` ctor param,
`:1461` `this.audit.record(...)`). It is never registered as, or resolved
from, the kernel `audit` slot.
The slot's only registrant is `AuditPlugin`, which registers
`createAuthEventAuditSink(...)` at `audit-plugin.ts:117-118` — canonical
source `packages/plugins/plugin-audit/src/auth-event-audit.ts`, whose
surface is `recordAuthEvent`, not `record`.
Repoints the entry and, rather than swapping it silently, keeps the other
sink reachable: a callout names `SettingsAuditSink` as the
constructor-injected thing it is, gives its real source, and says why the
slot never returns it — mirroring the reconciliation the linked
`audit-service` page received.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 18, 2026
@github-actionsgithub-actionsBot added size/s documentation Improvements or additions to documentation labels Aug 18, 2026
@os-steve
os-steve marked this pull request as ready for review August 18, 2026 13:44
@os-steve
os-steve added this pull request to the merge queueAug 18, 2026
Merged via the queue into main with commit 85a067bAug 18, 2026
24 checks passed
@os-steve
os-steve deleted the claude/issue-9588-runtime-services-index-seam branch August 18, 2026 13:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/sskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runtime-services/index.mdx points "Audit bridge" at the settings sink, the same wrong seam #9534 fixed on the page it links to

2 participants

@os-steve@claude