Provenance: first-party writers (claudewatcher, pipeline) stamp origin: unknown — add an internal origin #148

Open
opened 2026-10-01 20:19:45 +00:00 by mathias · 0 comments
Owner

Follow-up to #145 / PR #147.

Provenance is stamped from the authenticated MCP/capture principal. Writers that bypass both, such as claudewatcher, the ingestion pipeline and REST POST /write, carry no principal and stamp origin: unknown. That's correct as a fail-closed default. But a trusted first-party source then looks the same as an anonymous one, which makes the signal noisier for a reader who wants to discount connector-written entries.

Wanted

These in-process writers pass an explicit Origin: "internal" through api.WriteNoteOptions, with WrittenBy set to the component name. REST /write stays unknown, because its body is caller-controlled and must never set provenance.

Done when

A claudewatcher-written fact shows origin: internal, written_by: claudewatcher, and a test proves REST /write still stamps unknown.

Blocked on #147 merging.


Created via git-mcp on behalf of @mathias

Follow-up to #145 / PR #147. Provenance is stamped from the authenticated MCP/capture principal. Writers that bypass both, such as claudewatcher, the ingestion pipeline and REST `POST /write`, carry no principal and stamp `origin: unknown`. That's correct as a fail-closed default. But a trusted first-party source then looks the same as an anonymous one, which makes the signal noisier for a reader who wants to discount connector-written entries. ## Wanted These in-process writers pass an explicit `Origin: "internal"` through `api.WriteNoteOptions`, with `WrittenBy` set to the component name. REST `/write` stays `unknown`, because its body is caller-controlled and must never set provenance. ## Done when A claudewatcher-written fact shows `origin: internal`, `written_by: claudewatcher`, and a test proves REST `/write` still stamps `unknown`. Blocked on #147 merging. --- _Created via git-mcp on behalf of @mathias_
mathias added the risk/lowsize/stype/feat labels 2026-10-01 20:19:45 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/hyperguild#148