Skip to content

feat: add multi-contributor managed memory - #179

Merged
kushalpatil07 merged 27 commits into
mainfrom
codex/multi-contributor-cli
Jul 29, 2026
Merged

kushalpatil07 merged 27 commits into
mainfrom
codex/multi-contributor-cli

Conversation

@kushalpatil07

@kushalpatil07 kushalpatil07 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the open-source client, protocol, graph rendering, and trusted GitHub Action support for multi-contributor managed memory.

  • one persistent working/<authenticated-user> view across sessions and branches
  • default server-composed main + mine, with repeatable/case-insensitive-deduplicated explicit --with-working, --main-only, Memory PR, and quarantine selectors
  • clients send only explicitly selected contributor logins, so readers without a personal working scope can inspect another authorized contributor
  • --main-only suppresses personal working while still composing with an explicit Memory PR or quarantine overlay
  • proposal, Memory PR, status, contributor invitation/grant/revoke CLI surfaces
  • human proposal list/show output includes the full Git head and agent platform; JSON retains the complete record
  • truthful retry output for newly queued, already-running, and legacy/neutral reconciliation responses, with unchanged JSON output
  • isolated memory pr context (main + Memory PR, without unrelated caller working memory)
  • stable/current/historical author identity plus session/Git/PR/promotion/repair/quarantine provenance in context and HTML graph views
  • every source origin retained when identical contributor drafts coalesce into one canonical version
  • provenance badges and interactive filters for component, flow, and claim versions
  • stable-user cleanup accounting with friendly current-login output and rename history
  • immutable version IDs so conflicting personal drafts remain independently reviewable
  • optional direct-default Memory PRs and Action/repair-readiness status fields
  • capability negotiation that preserves legacy defaults and fails closed when an older server cannot honor an explicit selector
  • exact-checkout reconciliation with version-keyed claim and component anchor fingerprints and OIDC attestation
  • PR-head and base proof that accepts only commits in the verified PR delta, including same-PR dependencies
  • exact code-merge proof that requires the recorded PR merge commit to exist in and be an ancestor of the audited default checkout
  • candidate-level code-merge rejection that preserves every memory commit for retry on a later descendant checkout
  • durable OIDC reporting of rejected proofs so the server can remove force-pushed-away selections and recompute the candidate
  • a current-remote-default-head check before candidate retrieval and attestation, preventing historical workflow replay
  • a pinned reusable workflow whose production API endpoint and OIDC audience cannot be redirected by callers

Exact-checkout repair evidence

Servers advertising reconciliation-code-evidence-v1 may opt a candidate into a bounded code_evidence attestation. Older candidates retain their exact prior wire shape.

  • packet is bound to repository ID/name and the full attested checkout SHA
  • deterministic canonical SHA-256 covers the packet; each snippet has its own SHA-256 and current anchor fingerprint
  • only explicitly selected claim/component anchors are considered, with exact deduplication and deterministic ordering
  • maximum 128 entries, 4 KiB/80 lines per snippet, 64 KiB of snippets total, and 1 MiB readable blobs
  • snippets come only from exact-path 100644/100755 blobs in the attested Git tree; checkout bytes must equal the blob
  • strict normalized paths, realpath containment, and submodule/nested-repository boundaries
  • ignored/untracked files, symlinks, gitlinks, non-regular objects, sensitive paths/content, binary files, and oversized files never contribute content
  • managed repair authorization is limited to resolved/file_only entries with a valid transmitted snippet hash and current fingerprint
  • evidence-enabled anchor audits and fingerprints are derived only from the packet; policy omissions become explicit unverifiable failures
  • exported canonical hash validator/actionability helper plus a fixed cross-runtime hash vector

The reusable workflow revision is f88edc0a2c02fe213f3bcc7166aac3b8928a42d7; it pins the composite Action implementation at 2c1e8a152126e3b156c2c8b924201bb27db66c07.

Compatibility

Local single-user behavior remains unchanged. New protocol fields are optional where older managed servers may omit them. Managed requests advertise the collaboration capabilities, while ordinary unselected reads continue to work with older servers. Explicit collaboration selectors fail closed if the server does not acknowledge them.

This PR is the upstream dependency of the companion managed-service PR. The managed PR must point vendor/greplica and all workflow allowlist/build references at this exact workflow revision, then update to the final merged OSS commit before it merges.

Validation

  • npm run typecheck
  • npm test
  • npm run test:managed-collaboration
  • npm run test:reconciliation-code-evidence
  • npm audit --audit-level=high — 0 vulnerabilities
  • git diff --check origin/main...HEAD
  • git fsck --no-dangling
  • clean-worktree assertion

The full suite has been run repeatedly. In addition to the collaboration/provenance coverage, the evidence suite exercises exact merged snippets and SHA binding, code/hash changes, canonical hash tampering, per-entry and aggregate truncation, >128 rejection, normalized-path traversal, external and in-repository symlinks, ignored secrets, gitlinks/submodules, sensitive paths and provider/private-key content, binary/oversized/missing files, duplicate anchors, dirty and mismatched checkouts, and repository no-write behavior.

@kushalpatil07

Copy link
Copy Markdown
Contributor Author

Managed-service integration is open at https://github.com/kushalpatil07/managed-greplica/pull/7. Merge order: this OSS PR first, then update the managed PR's submodule/workflow allowlist to the final merged OSS commit before merging managed.

@kushalpatil07

Copy link
Copy Markdown
Contributor Author

CI follow-up: handled harmless child-stdin EPIPE in the managed CLI test harness. The managed integration is now repinned to this PR head c83d112a4b792c863165d0d950cba6ead7b6f974.

@kushalpatil07
kushalpatil07 merged commit 0725bf1 into main Jul 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant