Skip to content

fix(runtime): locate the remaining secret-gate refusals - #2630

Merged
ohdearquant merged 1 commit into
mainfrom
fix/secret-gate-remaining-sites
Sep 12, 2026
Merged

fix(runtime): locate the remaining secret-gate refusals#2630
ohdearquant merged 1 commit into
mainfrom
fix/secret-gate-remaining-sites

Conversation

@ohdearquant

Copy link
Copy Markdown
Owner

A content secret gate refusal now names the record and field it fired on at the remaining write paths. The locating wrappers and the first 48 call sites landed earlier; this converts the rest.

What changed. 57 gate calls across the knowledge pack's domain and section ingest, the brain pack handlers, the code pack's source ingest, the direct code-ingest path, the stream batch writer, the archive importer and the note writer now report a location. Four batch loops gain an index, so a refusal from a bulk call reads section[3].content or entity[1].name rather than naming a field with no record.

One detail worth stating because it is a choice rather than an accident: the section index is the position in the discovered list, which is what the caller submitted, not the position among the sections that survived the minimum-length filter. A caller looking for section[3] should count the sections they sent.

Two documentation drifts, fixed with it. The wrappers called their first parameter scope and described it as the verb for a single-record write, while every call site in the tree passes a record noun: entity, note, task, proposal, message. The code was right, so the parameter and the prose now both say record.

The two outbound delivery paths both reported message.delivery, and no payload has a field by that name. One scans delivered_at and transport_message_id, the other failed_at and last_error. They now report message.delivered and message.failed, which match the verb that carries them.

Deliberately not converted. Two sites in the version-control sync path already name the record and the field in the error context they build, so converting them would say it twice. Test and acceptance files that call the gate directly are checking the detector, not writing records, and are left alone.

Scope. This adds identity to a refusal. No detector, no classification and no fail-closed behaviour changes: the wrappers pass every non-refusal error through untouched, which the existing tests for the wrapper mechanism already assert.

Forty-eight call sites already named the record and field a content gate
refusal fired on. The rest did not, so a refusal from the knowledge pack's
section ingest, the brain pack handlers, the code pack, the direct code
ingest path, the stream writer and the archive importer still told the
caller only what matched, not where the scan was looking.

This converts them to the locating wrappers. Four batch loops gain an
index so a refusal from a bulk call reads section[3].content or
entity[1].name rather than naming a field with no record. The section
index is the position in the discovered list, which is what the caller
submitted, not the position among the sections that survived the minimum
length filter.

Two documentation drifts land with it. The wrappers called the first
parameter scope and described it as the verb for a single-record write,
while every call site in the tree passes a record noun; the code was
right, so the parameter and the prose now both say record. The two
outbound delivery paths both reported message.delivery, and the payload
has no field by that name: one scans delivered_at and
transport_message_id, the other failed_at and last_error, so they now
report message.delivered and message.failed.

Two sites in the version-control sync path are deliberately unconverted.
They already name the record and the field in the error context they
build, so converting them would say it twice.
@ohdearquant
ohdearquant force-pushed the fix/secret-gate-remaining-sites branch from 203769d to 7693946 Compare September 12, 2026 12:51
@ohdearquant
ohdearquant merged commit ed356af into main Sep 12, 2026
30 checks passed
@ohdearquant
ohdearquant deleted the fix/secret-gate-remaining-sites branch September 12, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant