Skip to content

Armonia · Session owner and prompt author attribution #1875

Open

Description

@aarontrowbridge

Important

Problem — Sessions have no owner and prompts have no author. The only provenance is client-writable metadata, so it cannot be trusted for ownership, control, or audit.
Approach — Record owner and creator on every session from the authenticated principal, on both the legacy and V2 session paths, and record the author on every admitted prompt and user message. Attribution is set by the server only.
Scope — in: session owner/creator, prompt and user-message author, spawned sessions inheriting their parent session's owner, migration for existing rows. out: collaborators and control checks, visibility filtering.
Assumptions — The principal from the identity slice is available in every request that creates a session or admits a prompt.

Acceptance Criteria

  • Creating a session through either session path records the caller as owner and creator.
  • Every admitted prompt and created user message records the caller as author.
  • A client that supplies owner or author in session metadata or prompt payload cannot change the recorded value.
  • A session spawned by an agent records the parent session's owner as owner and the spawning session in its lineage.
  • Existing sessions without an owner are reported as unowned, not attributed to whoever reads them.
  • Session and message read APIs expose owner, creator, and author.

Testing Decisions

Extend the session creation, prompt admission, and session lineage tests on both paths; add a forgery test that supplies attribution through metadata.

Key Decisions

  • Owner is mutable only by an explicit transfer action (out of scope here); creator and author are immutable.
  • Agent-originated prompts are authored by the session owner's principal plus the acting agent identity, never by an anonymous system.

Constraints & Invariants

  • Migration is additive; no existing session content changes.

Prior Art

  • The session table and projector, V2 session admission, the session-spawn tool's metadata, and session lineage edges.

Source

Metadata

Metadata

Labels

afkImplementable without human interaction

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions