Repository navigation
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level blocker: the auto-pin goes through the existing pin route, only fires when a person is in the turn and the tier is a standing rule, and is off by default behind Notes
[DESIGN-REVIEWED] a497f7d Description read[DESCRIPTION-READ] 32e2fa1b1a02acde36c684ea19f111298cf3c05fd6e481b012e4e093f8993c02 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The base RFC Notes
What this change shipsInventory (7 items) — 7 justifiedIntent: when a person teaches the bot a rule in a chat with pinned memory on, that rule survives every compaction without the agent having to choose to pin it. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] a497f7d Description read[DESCRIPTION-READ] 90a52ff11964ea8c0e9132eebf3359a037dd950ed5dcaf87b7273795d21588b8 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
0b1c0db to
b6e9d2c
Compare
b6e9d2c to
e1286bd
Compare
1793f39 to
688c5cc
Compare
688c5cc to
da196f2
Compare
95ecfe4 to
05b04eb
Compare
da196f2 to
9eb15e0
Compare
05b04eb to
c07551b
Compare
9eb15e0 to
8e68d39
Compare
c07551b to
f870e85
Compare
8e68d39 to
58601fb
Compare
* docs(rfc): propose pinned memory, with pinning onto workers Pinned memory is built across open PRs #46364, #46450, #47044 and #47068, but has no RFC. This one records what that stack builds, and proposes one addition: a chat that starts workers pins memories of its own store onto them, so a worker keeps its starter's rules after a compaction. The reading surface (a side-panel item) is in progress. * docs(rfc): name the pull request that carries the pinned memory rfc * docs(rfc): deliver a mid-run pin to the worker at once Record the maintainer's rulings of 2026-12-04 as settled rules and empty the open questions. A pin made while a worker runs now reaches it at once as one gateway prompt of a new `pin` kind, queued behind a running turn, instead of waiting for the next compaction. Drop the byline for a starter chat that no longer exists.
f870e85 to
85aadfb
Compare
58601fb to
1e4b873
Compare
0d28ae4 to
4432ba2
Compare
b08766f to
ea1b974
Compare
4432ba2 to
6429a0f
Compare
d37eaa0 to
167ef28
Compare
|
Disposition for Opus 5.5 Review on
|
|
Disposition for GPT 6.1 Review on
|
|
Disposition for GPT 6.1 Review on
|
With pinned memory on, a lesson the agent saved when a person corrected it was still only ranked after a compaction: nothing pinned it unless the agent chose to. The lessons route now pins a lesson saved by the agent's own learn_add on a turn a person opened, through the pin route's own path. It asks only for an attested session key, a turn whose frozen opener is a person's, a standing rule (not an on_topic finding), and a key: the row the save wrote, or on an exact repeat or a covered lesson the stored row that already holds it (LessonWriteResult.match_key, new). A new pin draws the one Pinned row instead of the Lesson saved row, and learn_add says what the pin did. remember_and_pin pins on its own and is not asked. A pin whose lesson was replaced by one the chat already pins is dropped with no notice, so a person who corrects a rule is not told it was deleted.
A withdrawn steer keeps its user role and human marker with its text cleared, so _person_in_turn read an automatic turn as one a person was in and auto-pin could pin a lesson nobody taught. Skip withdrawn steers.
A lesson a stored one contains or resembles was pinned as the stored
row, but containment and similarity can match the opposite rule ("Never
use tabs" contains "use tabs"). DEDUPED no longer names a row, so only
an exact repeat pins the row that already holds it.
A steer still written, requeued or taken back counted as a person in the turn, so an automatic turn's lesson could be pinned on a steer the turn never read. A steer now counts only when its state is consumed.
Problem / Motivation
Goal: With pinned memory on, a rule a person teaches in a chat is pinned to that chat on its own, so it comes back whole after every compaction.
With
memory.pinned_memoryon, a lesson the agent saves when a person corrects it is still only ranked after a compaction: nothing pins it unless the agent chooses to, and an agent rarely acts unprompted. This is part 4 of pinned memory; it stacks on #47044 (tell and remind), which stacks on #46364 (it now also carries what was #46450).Why it matters
What a person told the bot to remember is the memory they most expect to survive a compaction. Leaving it to the agent's judgement at the moment of the save is the weak point the earlier recall rounds measured.
Not a goal
memory.pinned_memory.What changed (motivation → approach → change)
Goal → pin at the save, through the existing pin path, only when a person is in the turn →
dashboard/handlers/cron_lesson_autopin.py(new) decides;handlers/pinned_memory.pin_lessonpins.When. The lessons route asks for the pin when every one of these holds:
learn_add, with internal auth and a session key the transport attests;slot._turn_row) is a person's bymemory_origin_gate.classify_turn, or a person's message was steered into it;appliesis unstated oralways, so anon_topicfinding is not pinned.remember_and_pin(pin_follows) pins on its own and is not asked.Which row.
LessonWriteResult.match_key(new) names the stored row on an exact repeat (unchanged) and on a lesson a stored one covers (deduped), so "I told you before" in another chat pins too.keykeeps meaning "the row this call wrote".One chat row. A new pin draws the "Pinned: …" row, and the lessons route then draws no "Lesson saved" row. Otherwise the lesson row stays.
What the agent is told.
learn_addadds what the pin did: pinned, already pinned, or not pinned and why. A covered lesson says the covering one was pinned. The reply is built by_learn_add_reply, moved out unchanged.A correction. When the store replaces a lesson and the replacement is already pinned in its current life, the old pin is dropped with no notice (
pinned_memory._settle). Without that, the person who corrected a rule would read that a pinned memory was deleted.Docs:
memory-skills-hooks.md(Pinned memory). The design and its whole-class table (repeats, corrections, other chats, "forget that", tidying) went through two second-model reviews before code.Backwards compatibility
Compatible: with
memory.pinned_memoryoff (the default) nothing is asked and no answer changes.match_keyis a new field with a default; no caller compares whole results.Removes nothing: the "Lesson saved" row is replaced by a "Pinned" row only for a save that the pin row covers.
Tests
test/test_pinned_memory.py:TestAutoPin:pin_lessonpins then answersalready_pinned; a repeat names the stored row; a replacement already pinned drops the old pin quietly.TestAutoPinDecision: each condition; a person's steer into an automatic turn counts; the tier is read from the stored row; the answer says what the pin did, and a covered lesson names the covering one.test/test_lesson_saved_card.py: one row whether the pin ispinned,already_pinnedor not asked.Proof: not provable -- other: a new feature with no fix to revert; mutation-checked instead (the person-turn check, the row skip and the quiet drop each turn a test red).
Manual verification
Pending: a pod with pinned memory on, teaching a rule in a chat and reading the row and the pin list.
Real-machine verification
Pending, with the manual verification above.
Screenshots / video
N/A -- no frontend file changes; the row is the existing "Pinned: …" row.
Related Issues
Part of #46328
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commitsContribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.