fix: discover local human targets for explicit forwarding #70

Merged
morten-olsen merged 1 commit from fix/c6a4b291-human-conversation-discovery into main 2026-10-20 21:33:51 +02:00
Owner

Summary

A role receiving agent text could explicitly forward it with conversation send --conversation, but had no supported way to discover that local target: the CLI had no list command and the existing list route returned an empty array for role tokens. Head of IT consequently could not post Morten’s requested test text despite their conversation already existing.

conversation list → existing own-role local targets → assignee list identifies person → explicit send --conversation <id>

Reuse the existing authorized list route/query, filtering role tokens by both organization and authenticated role ID. Human callers keep their existing user filter. The response contains existing conversation metadata, without transcript text. Runtime help describes discovery and explicit selection; discovery neither starts a conversation nor forwards anything. No active human runtime is required.

Evidence

  • Before: live SQLite confirms Head/Morten’s existing target while the role’s accepted reply reports no locally known ID. Regression reproduced empty discovery (two failing assertions).
  • After: service/API authorization suite 16/16 and CLI/runtime integration 24/24 pass. CLI test selects the discovered target before posting and still rejects another role’s target. Full local and two-installation WebSocket runtime flows now discover their target through the API rather than receiving a conversation ID in fixture environment.
  • Repository type/build checks, focused ESLint, dependency checks and diff checks pass. Standards and Spec self-review found no findings; separate blocking Security Engineer review is required for this local metadata discovery change.

Merge danger

Door: two-way. No schema or credential change; revert removes discovery while preserving all accepted text.

Blast radius: app.

Rollback and verification

  • Roll back: revert or use compatible v0.50.0; retain migration 037, registry, third run subject and every durable record.
  • Verify after rollout: exact release image pair, mirror and Argo revision; normal role-token discovery includes its local target and excludes another role/organization; explicit authorized human forwarding reaches one human copy. Preserve the accepted real test text and do not resend it automatically.
  • Reviewers: Security Engineer checks role/organization filtering, unchanged human privacy, API/CLI exposure, explicit-only local forwarding and remote isolation. No new installation exposure or credentials.
## Summary A role receiving agent text could explicitly forward it with `conversation send --conversation`, but had no supported way to discover that local target: the CLI had no list command and the existing list route returned an empty array for role tokens. Head of IT consequently could not post Morten’s requested test text despite their conversation already existing. `conversation list → existing own-role local targets → assignee list identifies person → explicit send --conversation <id>` Reuse the existing authorized list route/query, filtering role tokens by both organization and authenticated role ID. Human callers keep their existing user filter. The response contains existing conversation metadata, without transcript text. Runtime help describes discovery and explicit selection; discovery neither starts a conversation nor forwards anything. No active human runtime is required. ## Evidence - Before: live SQLite confirms Head/Morten’s existing target while the role’s accepted reply reports no locally known ID. Regression reproduced empty discovery (two failing assertions). - After: service/API authorization suite 16/16 and CLI/runtime integration 24/24 pass. CLI test selects the discovered target before posting and still rejects another role’s target. Full local and two-installation WebSocket runtime flows now discover their target through the API rather than receiving a conversation ID in fixture environment. - Repository type/build checks, focused ESLint, dependency checks and diff checks pass. Standards and Spec self-review found no findings; separate blocking Security Engineer review is required for this local metadata discovery change. ## Merge danger **Door:** two-way. No schema or credential change; revert removes discovery while preserving all accepted text. **Blast radius:** app. ## Rollback and verification - **Roll back:** revert or use compatible v0.50.0; retain migration 037, registry, third run subject and every durable record. - **Verify after rollout:** exact release image pair, mirror and Argo revision; normal role-token discovery includes its local target and excludes another role/organization; explicit authorized human forwarding reaches one human copy. Preserve the accepted real test text and do not resend it automatically. - **Reviewers:** Security Engineer checks role/organization filtering, unchanged human privacy, API/CLI exposure, explicit-only local forwarding and remote isolation. No new installation exposure or credentials.
fix: discover local human conversation targets for explicit forwarding
All checks were successful
ci/woodpecker/pr/deploy-tools Pipeline was successful
ci/woodpecker/push/deploy-tools Pipeline was successful
ci/woodpecker/pr/image-agent Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/pr/image Pipeline was successful
ci/woodpecker/pr/quality Pipeline was successful
ci/woodpecker/push/quality Pipeline was successful
ci/woodpecker/pr/docs Pipeline was successful
ca9d16721b
morten-olsen left a comment

Owner self-review of ca9d167 against main57a858b8.

Standards: 0 findings after independent parallel review of production/docs and final test hunks. CLI remains typed parse/call/print; service owns role/organization filtering; existing query/schema reused.

Spec: 0 findings. Discovery returns only existing local own-role metadata; human caller privacy stays unchanged; runtime requires explicit local target selection. Regression red on empty role listing; service/API16, CLI/runtime24 and revised full-flow3 pass. Both transports discover the target through authenticated API without pre-injected conversation IDs. Types/lint/deps/format pass.

Blocking gate: separate Security Engineer review of metadata discovery plus green #479/#480 before merge. Actual production discovery/forwarding remains unverified until the combined patch rollout. Revert/compatible v0.50.0 recovery retains all durable records.

Owner self-review of ca9d167 against main57a858b8. Standards: 0 findings after independent parallel review of production/docs and final test hunks. CLI remains typed parse/call/print; service owns role/organization filtering; existing query/schema reused. Spec: 0 findings. Discovery returns only existing local own-role metadata; human caller privacy stays unchanged; runtime requires explicit local target selection. Regression red on empty role listing; service/API16, CLI/runtime24 and revised full-flow3 pass. Both transports discover the target through authenticated API without pre-injected conversation IDs. Types/lint/deps/format pass. Blocking gate: separate Security Engineer review of metadata discovery plus green #479/#480 before merge. Actual production discovery/forwarding remains unverified until the combined patch rollout. Revert/compatible v0.50.0 recovery retains all durable records.
morten-olsen left a comment

Reviewed ca9d167 against merge-base 57a858b8. Standards: 0 findings. Organization access is checked before AND-filtering organizationId and authenticated roleId; user-only privacy and system empty list are retained. Metadata includes IDs, timestamps, read state and archive count, without transcripts. No schema, secrets, image, privilege or exposure changes. Spec: 0 findings. Discovery is read-only; explicit send retains separate ownership authorization and wrong-role 404. Run credentials retain active-run validation; role credentials need no human runtime. Peer text grants no API authority; explicit forwarding remains an agent decision, not a server-enforced human approval. Inspected service/API/CLI and local/WebSocket full-flow tests. Independently verified CI 479 and 480 success at exact head through Woodpecker API; no local test rerun (dependencies absent). Live kubectl deployment image remains 0.50.0, so new behavior is not verified live. Owner must verify own-role discovery, person isolation, wrong-role 404 and explicit selected-text delivery after rollout. Roll back compatible code/image while retaining schema037, registry and all accepted/failed text; no data deletion. Standards: 0, worst none. Spec: 0, worst none.

Reviewed ca9d167 against merge-base 57a858b8. Standards: 0 findings. Organization access is checked before AND-filtering organizationId and authenticated roleId; user-only privacy and system empty list are retained. Metadata includes IDs, timestamps, read state and archive count, without transcripts. No schema, secrets, image, privilege or exposure changes. Spec: 0 findings. Discovery is read-only; explicit send retains separate ownership authorization and wrong-role 404. Run credentials retain active-run validation; role credentials need no human runtime. Peer text grants no API authority; explicit forwarding remains an agent decision, not a server-enforced human approval. Inspected service/API/CLI and local/WebSocket full-flow tests. Independently verified CI 479 and 480 success at exact head through Woodpecker API; no local test rerun (dependencies absent). Live kubectl deployment image remains 0.50.0, so new behavior is not verified live. Owner must verify own-role discovery, person isolation, wrong-role 404 and explicit selected-text delivery after rollout. Roll back compatible code/image while retaining schema037, registry and all accepted/failed text; no data deletion. Standards: 0, worst none. Spec: 0, worst none.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ai/mission-control!70
No description provided.