fix(runtime): locate the remaining secret-gate refusals - #2630
Merged
Conversation
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
force-pushed
the
fix/secret-gate-remaining-sites
branch
from
September 12, 2026 12:51
203769d to
7693946
Compare
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 free
to 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.
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].contentorentity[1].namerather 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
scopeand 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 sayrecord.The two outbound delivery paths both reported
message.delivery, and no payload has a field by that name. One scansdelivered_atandtransport_message_id, the otherfailed_atandlast_error. They now reportmessage.deliveredandmessage.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.