Repository navigation
Commit e7ce606
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DJQ32N7D7QcUWJ5SjJDMCT5)_
domain:server#4 · os-elon-musk · session_016WV4d1abDZNVe9GRYCpLEn
Fixes #30945
Claim: 6688172302 (full re-post with `sys-audit-log.page.ts` on the
surface)
Clause-②: no (comment-only)
Metadata-protocol: none
## 维护者速读
- 改了什么:`plugin-audit` 三处注释。只改注释,不改任何代码行为。
- 为什么改:#30937 之后,非密钥设置的 `config_change`
审计行自己就带可读的改前值和改后值,旧注释还说它只有摘要、不带字段值。
- 风险与回滚:零运行时风险,单提交可整体回滚。
- 先看:`audit-plugin.ts` 第 277 行起;`audit-log-read-visibility.ts` 第 57
行起;`sys-audit-log.page.ts` 文件头第 14 行起。
- 需要你做的:无,席位落地。
## What changes
Three comments in `packages/plugins/plugin-audit/src/`. No code line
changes.
- `audit-plugin.ts` (the `pages:` comment, about :277). It said a
`config_change` row's digest sits next to the CRUD mirror's row "that
carries the value". After #30937, `config-change-audit.ts` writes
`old_value` / `new_value` as `{ namespace, key, scope, value, digest }`,
with `value` omitted only for a secret-valued key. The comment now says
the record page puts the `config_change` row beside the mirror's rows
about the same settings row, that a non-secret key's row carries its
readable before and after itself, and that a secret-valued key's row
carries only the digest.
- `audit-log-read-visibility.ts` (the "Rows about no record" bullet,
about :57). It said these rows carry no record's field values. A
`config_change` row stored before its writer recorded the settings row
has no `record_id`, but still names its store as `object_name` and still
carries the setting's `value` and `digest`. The false clause is removed.
A new sentence says what `redactAuditLogRows` does: it keys on
`object_name` and `action`, not on `record_id`, so a `config_change` row
naming `sys_setting` or `sys_platform_setting` has `value` and `digest`
dropped on both sides for a reader whose field-level security masks that
store's `value`, with or without a `record_id`.
- `sys-audit-log.page.ts` (module header, about :14-24). It said a
`config_change` row's `new_value` is a DIGEST, never the value, and that
the value is one row down. It now says the row carries a non-secret
key's readable before and after and only the digest for a secret-valued
key, and that the page lists the `config_change` row beside the mirror's
rows as the settings row's history.
## Why
PR #30937 (#30923) made the row readable and added the
`object_name`-keyed narrowing in `audit-log-field-redaction.ts`. These
three comments still described the earlier digest-only row. Found in
that PR's contract review (6685638224), filed as #30945.
## Verification
`skip-changeset`: comment-only, nothing publishes a different behaviour.
`node scripts/pm/dispatch-gates.mjs --ran`: 47 derived, 41 run with exit
0, 6 NOT MEASURED (exit 3, prerequisite not met), 0 unrun.
- NOT MEASURED, reason: they read `dist/` of the whole workspace, which
a fresh worktree has not built. `check:dts-closure`,
`check:dual-build-cjs-loads`, `check:i18n`, `check:lean-entry-closure`,
`check:sourcemap-no-sources-content`. CI runs them.
- NOT MEASURED, reason: shallow clone cannot reach the pinned
positive-control commit. `check-plugin-teardown-shape.mjs --self-test`
(checker health only). CI runs it.
No dogfood run, no unit test change: the diff touches no executable
line.
## Acceptance notes
- None.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran; lint
not run locally, CI runs it.)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [ ] 6. (n/a, not touched) `packages/spec` touched: its generated
artifacts are regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016WV4d1abDZNVe9GRYCpLEn
<!-- signed: domain:server#4 · os-elon-musk ·
session_016WV4czvZykUqhYxYXSSDt4 -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8847e09 commit e7ce606
3 files changed
Lines changed: 21 additions & 14 deletions
File tree
- packages/plugins/plugin-audit/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
0 commit comments