D44 — Every merge and rejection is logged, and the actor is declared¶
- Status: Accepted — amended by D47b (a decision also names who made it); the actor on a signed bundle is verified by D47g
- Date: 2026-09-22
- Origin: slice 17a, from an audit of Project Flash
- Area: writes
Decision¶
A new append-only table, reviews, gets one row for every row whose status
changes to merged or rejected. Each review records:
| Field | Meaning |
|---|---|
action |
merged or rejected |
actor |
who says they are deciding: user, agent or unknown — declared, never verified |
surface |
what the call came through: cli, mcp or api — recorded by the code |
via |
how the row was chosen: named (its id, or a dependency of one), policy (a bulk merge the write policy let through), release (a claim freed when its entity was confirmed, D33d), import (an import merging itself, D33e) |
root_id |
for a dependency, the id the call actually named |
why |
the reason for a rejection, or the instruction a merge acted on |
- Setting the actor.
kg mergeandkg rejecttake--by user|agent. The default is$KG_ACTOR, thenunknown. The MCPreviewtool takesby, defaulting toagent; imports record the surface they ran through. - The
why.kg mergegains--why, andkg reject --whyis finally stored. - Nothing lands unlogged. A merge or rejection with no review context is still logged, as
unknownviaapi. - Schema 5 is additive. The table is created by
CREATE TABLE IF NOT EXISTS, and no existing row is touched (D24). Decisions made before it are reported as unrecorded, never attributed.
Why¶
Asked for an audit trace of a site, the graph could show the evidence behind every value in full, but not one decision about it:
kg reject --whyaccepted a reason and threw it away. Every rejection written before this slice has lost its reason, including the corrections of an agent's own errors.- A row merged because the user said "merge them all" was stored exactly like one the write policy let through on its own, or one an import landed.
The policy (D33) exists so that some rows wait for a person. A log that cannot say whether a person was involved makes that guarantee unverifiable after the fact.
The actor is declared, not verified¶
Claude Code and a person run the same CLI, as the same OS user, against the same file. Nothing local can tell them apart, and pretending otherwise would put false confidence in the log.
So the actor is what the caller says it is, and every trace ends by saying so. The skill tells agents to declare themselves and, when they act on the user's instruction, to put the instruction in --why in the user's words.
A verified actor needs an identity the graph does not have: a hosted server, or signed requests. It is recorded here as the limit of this decision, not a gap to paper over.
Rejected alternatives¶
- Surface only. Recording only
cliormcp, which the code knows for certain, cannot tell the user's merge from the agent's in the CLI, which is the common case. - Refusing an agent's merge of a held row unless it quotes the user. This is enforcement built on an unverifiable actor: an agent could pass the check by declaring
user. The log plus the skill's instruction is honest about what it is. - A
reviewed_bycolumn on every staged table. This is eight migrations instead of one table, and one column cannot hold both the merge and a later unmerge.