You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Attribute every harness/worker log line to its subject and session #359
No log line in the harness or the P6 worker carries the subject (the user) or the session it was written for. P5 requires per-session attribution per log line: docs/specs/2026-09-06-p5-session-isolation-design.md, in the paragraph on TurnConfig.subject, says that in a process multiplexing S sessions it is "the only route to per-session attribution, per log line, on a hot path". MI1 S1 (#350) makes several users in one worker the normal case, and none of the ~50 console.* sites in packages/knative-server/src and harness/src says whose turn it was. An operator investigating an incident, or answering "what did user X's session do?", has to correlate by timing.
What closing it needs
A per-turn logger (or AsyncLocalStorage-scoped context) carrying subject and sessionId, set where resolveTurnAuth resolves the caller. The error, auth-refusal and turn-lifecycle log lines use it.
The subject is an identifier, never a credential. Log lines must never include tokens, and a test should plant a token and assert it appears in no output.
A test: two concurrent turns for different subjects produce log lines each attributed to the right subject.
Context
docs/specs/2026-09-28-moca-multi-user-isolation-design.md §13 ("Subject on every log line") defers this to the first slice that multiplexes users (S2). It was raised in round 1 of #350's review as a regression against P5's requirement.
Confirmed running in moca version edge-12536a6: tailed kubectl logs on all five server components (supervisor, control plane, context-service, both sandbox pods) through a full dispatch cycle. Zero bytes of new output on four of them; supervisor emits 1 pool-admission line, no sessionId. The subject/sessionId attribution in this issue scopes assumes those console.* sites fire during request handling — on edge-12536a6 they don't appear to.
Worth broadening the scope here (or opening a sibling) to cover emitting any per-request lines in the first place. The information exists in Redis's sh:cp:audit stream (session_created, credential_issued, session_deleted keyed by sessionId) — mirroring those writes to the component logger at INFO would surface them and attribution work has something to label.
Activity
evaline-ju commentedon Oct 20, 2026
Confirmed running in moca version
edge-12536a6: tailedkubectl logson all five server components (supervisor, control plane, context-service, both sandbox pods) through a full dispatch cycle. Zero bytes of new output on four of them; supervisor emits 1 pool-admission line, no sessionId. The subject/sessionId attribution in this issue scopes assumes thoseconsole.*sites fire during request handling — on edge-12536a6 they don't appear to.Worth broadening the scope here (or opening a sibling) to cover emitting any per-request lines in the first place. The information exists in Redis's
sh:cp:auditstream (session_created, credential_issued, session_deleted keyed by sessionId) — mirroring those writes to the component logger at INFO would surface them and attribution work has something to label.