Uh oh!
There was an error while loading. Please reload this page.
docs(kernel): point the runtime-services index at the audit slot's real registrant - #9605
Merged
Merged
Conversation
…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
os-steve
marked this pull request as ready for review
August 18, 2026 13:44
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Fixes#9588
content/docs/kernel/runtime-services/index.mdx:46listed the canonical source for the audit slot aspackages/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
settings-service.types.ts:163declaresSettingsAuditSink, whose method isrecord(entry). It is constructor-injected:settings-service.ts:578takes it as a ctor parameter,:531holds it asprivate audit?, and:1459-1461callsthis.audit.record({ ... })inside atryafter a settings write lands. Nothing registers it as a service.packages/plugins/plugin-audit/src/audit-plugin.ts:117-118runsctx.registerService('audit', createAuthEventAuditSink({ ... })). Canonical sourcepackages/plugins/plugin-audit/src/auth-event-audit.ts, which declaresAuthEventAuditSinkat:112with exactly one method,recordAuthEvent(event)at:118, produced bycreateAuthEventAuditSinkat:153.grep -rn "registerService(\s*'audit'"overpackages/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.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.tsbecomes- 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.Not this: the settings audit sinkcallout under the list namesSettingsAuditSink, gives its real source, says it is constructor-injected and never resolved from the slot, and notes the resolved object exposesrecordAuthEventand notrecord. This mirrors the reconciliation PR docs(kernel): document services.audit as the slot it actually is #9587 added toaudit-service.mdxinstead 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.smsalthough that page exists and its slot is registered, and the Source-of-Truth list carries aSecurityrow for which this chapter has no page. Both reach past this file —content/docs/kernel/index.mdxcarries 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.storageis notation for the really-registered keyfile-storage(storage-service-plugin.ts:237;content/docs/kernel/contracts/storage-service.mdx:12gives 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 at981293858:check:docs-audit-scopecheck:docs-redirectscheck:role-wordcheck:nul-bytesspec check:empty-statespec check:livenessspec check:strictness-ledgerspec check:variant-docscheck:nul-bytesis 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-changesetrather than a changeset.Generated by Claude Code
Generated by Claude Code