feat(memory): add ccc-piri node-global Piri memory launcher - #960
Merged
Conversation
seoseo-ai
approved these changes
Aug 5, 2026
seoseo-ai
left a comment
Collaborator
There was a problem hiding this comment.
Approved after explicit operator authorization using the local seoseo-ai credential.
Node-global counterpart of ccc-codex: materializes the shared ccc-node snapshot into the Piri global context file (<piri-agent-dir>/AGENTS.md, via CODEX_HOME indirection + CCC_MEMORY_MATERIALIZER_PROVIDER=piri) before exec'ing the real Piri CLI. Closes the injection gap where node-global Piri sessions (bridge RPC, print-mode, interactive) started with no memory while audience-scoped sessions already had a runtime bootstrap. Guards keep non-user runs memory-free: the nunchi piri-feed extractor session dir, CCC_MEMORY_AUDIENCE_SCOPED (runtime-owned bootstrap), and the CCC_PIRI_MEMORY_SKIP kill-switch. Shares the ccc-codex fail-closed contract (exit 78, last-valid-snapshot fallback, argv/cwd/stdio/signal preservation via final exec). Deployed and live-verified on soonwook (vps6): new Piri sessions through the wrapper confirm the injected snapshot (MEMORY_OK round-trip). - setup.sh installs the launcher beside ccc-codex; summary prints CCC_PIRI_CLI_PATH - scripts/ccc-piri.test.sh: 13 hermetic launch-surface + guard tests - docs/memory.md: Piri global snapshot materializer section
jinon86
force-pushed
the
feat/ccc-piri-memory-wrapper
branch
from
August 5, 2026 11:18
a8b1714 to
efbd773
Compare
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Node-global counterpart of
ccc-codex: ccc-piri materializes the shared ccc-node memory snapshot into the Piri global context file (<piri-agent-dir>/AGENTS.md) before every Piri launch, closing the gap where node-global Piri sessions (bridge RPC, print-mode, interactive) started with no memory injection — only audience-scoped sessions had a runtime bootstrap.This completes the "one snapshot spec + per-provider adapter" convergence: Claude (SessionStart hook), Codex (ccc-codex → global AGENTS.md), Piri (ccc-piri → global AGENTS.md) all start from the same bounded
load-memory.shpolicy + managed nunchi merge.Mechanism
<CODEX_HOME>/AGENTS.md; the launcher runs it withCODEX_HOMEpointed at the Piri agent dir (${PIRI_CODING_AGENT_DIR:-~/.piri/agent}) andCCC_MEMORY_MATERIALIZER_PROVIDER=piri, thenexecs the real CLI (argv/cwd/stdio/exit/signals preserved).Guards (non-user runs stay memory-free)
PIRI_CODING_AGENT_SESSION_DIRunder.piri-feed-extractor-sessions→ nunchi piri-feed extractor bypasses the bootstrap entirelyCCC_MEMORY_AUDIENCE_SCOPEDtruthy → skipped (audience-scoped sessions are bootstrapped by the bridge runtime via--no-context-files --append-system-prompt)CCC_PIRI_MEMORY_SKIP=1→ operator kill-switchLive verification (soonwook/vps6)
MEMORY_OK)CCC_PIRI_CLI_PATHat the wrapper withCCC_PIRI_REAL_CLI_PATH=/opt/piri/piri-ccc.sh; service restarted clean, error log emptyChanges
scripts/ccc-piri(new),scripts/ccc-piri.test.sh(new, 13 hermetic tests incl. all guards)setup.sh: installs the launcher besideccc-codex; summary printsCCC_PIRI_CLI_PATHscripts/setup.test.sh: install + dry-run assertions for ccc-piriscripts/validate-harness.sh: registers the new testdocs/memory.md: "Piri global snapshot materializer (ccc-piri)" sectionTest plan
scripts/ccc-piri.test.sh13/13scripts/ccc-codex.test.sh9/9 (no regression)scripts/setup.test.sh69/69scripts/validate-harness.shfull PASSRollback
Restore
zz-piri.conf.bak-pre-ccc-piri-20260805drop-in on the node and restart the bridge; the wrapper is inert unlessCCC_PIRI_CLI_PATHpoints at it.