Repository navigation
feat(kin): the owner saves standing rules in Kin, a turn checks for rule changes at its start, and a refused memory push no longer fails a turn - #1103
Conversation
People-change: The company owner can open and save standing rules from a signed-in client. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Require the owner’s paired client for rulebook reads and compare-and-set saves. Pin current rules for every lead and reconcile remote memory in the background, so a rejected publication does not undo a completed wake. People-change: Standing rules saved in Kin take effect on the next turn, and an outside memory edit no longer turns a posted reply into a failed wake. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Check the remote tip at publication as well as reconciliation. The new commit was verified to descend from the fetched tip; the expected-ref lease prevents restoring history an owner just rewound. People-change: Kin keeps a journal locally instead of restoring older online memory if the online branch was rewound during publication. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Keep full Git checks on startup and the periodic audit, and never join them from a turn. Keep the owner pairing boundary, give legacy devices a re-pair refusal, and let the rules editor repair malformed remote rulebook states. Report direct publication refusal once through the existing owner notice. People-change: Turns no longer wait for memory housekeeping; the owner can repair broken standing rules and gets a clear next step when pairing or publishing needs attention. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Retry a failed integrity audit once after 30 seconds, off the turn path. Use Git’s per-ref push status to distinguish an explicit remote rejection from a connection failure. People-change: A passing memory audit fault clears sooner, and network trouble no longer asks the owner to fix write access. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
…le saves at its start People-change: none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
People-change: none Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Read the whole diff: 28 files, about 161k characters. Nothing blocking. This touches auth, so I went through rulesOwner (MemoryChanges.ts) line by line. It checks owner identity, that the session isn't revoked or expired, and how the device was paired (only one-time-token / desktop-bootstrap). saveRulesBook calls authenticate again before the commit and again inside the uninterruptible ref update. CAS on the rules.md revision, --force-with-lease with a descends check, and the lock order (landing → remote-sync → writer) all look right to me. The 16-case access matrix is the right test for this.
Things I'd tidy up, none of them blocking:
- Refused shadow pushes are now silent. MemoryWriter.ts dropped the
unpushedShadowsnotice ("check that the memory deploy key can push kin/shadow/*"), andpublishShadowsin MemoryLander.ts only logs a warning. If a deploy key loseskin/shadow/*access, an L0 lead's memory stays on this server for good and nobody hears about it. Suggest raising the samedirect-push-refusedepisode there when Git reports a per-ref[remote rejected]. - A closed standing-rules PR:
landOnceforgets the batch and refuses. But the rules commit is still on local main, so agents keep the rules and the next local change opens a new standing-rules PR with them. If that's intended (the owner saved them), fine; if a code owner closing it is meant to reject the rules, nothing undoes them locally. - nit: on the first wake after a start,
integrityis unset, sopreparerunsfsck --fullinline under the writer lock. That's one full audit on the turn path, despite the PR description. - nit:
prepareWakeupwaits at most 1.5 s for the background refresh. After a no-merge-base conflict is fixed upstream, turns keep refusing on the stalesyncFailuresentry until a slow fetch finishes. - nit: if
rules.mdis a directory,rulesPresentis true but there's no text, soreadRulesBookfails with "Unreadable rules.md" and the editor can't repair it. You'd have to go outside the app.
Tech lead, via Kin
The standing rules every agent follows could only be changed from outside the app, and a change made there could go unnoticed for up to five minutes. Also, when the memory repository turned down a journal push, the turn was marked failed even though its reply had already posted.
People-change: Standing rules saved in Kin apply from the next turn, and a reply that already posted is no longer marked failed when publishing memory needs attention.
Checked as part of train 19's one check at the tip.
An independent review by Claude Opus 5.5 found it LANDS. A second review of its fix round also found it LANDS, and the two follow-ups from that review are on this branch with their tests.
🤖 Generated with Claude Code