feat: owner sync, config-event persistence, version-check notify#13
Merged
Merged
Conversation
Port three adapter logics from zylos-openmax (reference), adapted to codex-openmax's TS thin-adapter over @openmaxai/openmax-agent-sdk: - runtime-config: mutable config provider + atomic persist (single on-disk writer) - config-events: onConfigEvent switch persists agent.config.* (dm/group policy, allowlists, owner_changed) — previously silently dropped - owner-sync: real syncSelf hydrates self display_name + owner_member_id from cws-core (pull-based, never clears a locally-set owner); 5-min periodic re-sync; onOwnerBind/onOwnerNameHint wired - version-check (opt-in, default off): npm-registry latest vs local, DM owner on a newer release; never self-upgrades Tests: +27 (173 total). build + typecheck + vitest all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gavin09527
approved these changes
Jul 21, 2026
gavin09527
left a comment
There was a problem hiding this comment.
Reviewed against openmax-agent-sdk@1.0.1 (ebaa356). LGTM — this is the correct fix for the group-message-rejection root cause (previously agent.config.* frames were silently dropped: no onConfigEvent wiring + no persistence layer).
Verified:
- SDK callback contracts all match:
syncSelf(orgConfig)(self-name-hydration.js:86),onConfigEvent(orgConfig, {event,data,frame})(orchestrator.js:550, rejection awaited+retried on replay per P1-3 test — matches the "let it throw" comment),onOwnerBind(orgId,memberId,displayName)(:435),onOwnerNameHint(orgId,name)(:438),loadConfig()→{orgs}org_id-keyed (:222).createDm({peerMemberId})alias +send({conversationId,content})match comm.js. - Security:
owner_changednever trusts the pushed frame — it only triggers a pull-based re-sync from core (tested with a forgedattacker_999frame). Good. - Idempotency:
applyBothruns the mutation on both the provider record and the SDK live copy (same object in normal wiring → double-applied); every case is assignment-only, so double application is safe. Verified each branch. - Persistence:
assembleOnDiskreproduces every blockloadConfigreads (server/agent/cf_access/orgs/codex/bridge/version_check) → round-trips; atomic 0o600 write preserves secrets. Disabled orgs still written to disk. - version-check: opt-in, default off, never self-upgrades, prerelease-aware semver, per-(org,version) dedupe. Fail-open.
CI green (Test/Semgrep/Gitleaks), +27 tests. No blocking issues.
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.
Port three adapter logics from zylos-openmax (reference), adapted to codex-openmax's TS thin-adapter over @openmaxai/openmax-agent-sdk:
Tests: +27 (173 total). build + typecheck + vitest all green.
What
Why
Test plan
npm testpasses locallynpm run buildpasses locallyChecklist
// nosemgrep: <rule-id>suppression is justified inline and approved by the project lead