M5a plan, task 04: check.rs given complete; later tests use no tags

Task 04's second session stopped too. It checked its code against the
markup test cases in its reasoning, and the tag it spelled out ended
its reasoning. Building tags from pieces keeps them out of files, not
out of the model's thoughts.

check.rs is now given whole, with the tags from pieces, and task 04
fills only entries.rs. The three later tests that used a tag only as
something the check refuses now use an instruction phrase or an
invisible character. They pass against the reference.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-25 16:41:44 -07:00
committed by kyle
co-authored by Claude Opus 5.5
parent 8328e8f607
commit 178484a981
6 changed files with 61 additions and 37 deletions
+13 -12
View File
@@ -17,7 +17,8 @@ Two small modules (M5a spec, section 3 and section 5, "The check"):
## Files
- Copy (skeletons): `crates/memoryd/src/entries.rs`, `crates/memoryd/src/check.rs`
- Copy (skeleton): `crates/memoryd/src/entries.rs`
- Copy (complete, nothing to fill): `crates/memoryd/src/check.rs`
- Copy (tests): `crates/memoryd/tests/entries.rs`, `crates/memoryd/tests/check.rs`
- Modify: `crates/memoryd/src/lib.rs`, `docs/implementer-log.md`
@@ -26,23 +27,23 @@ Two small modules (M5a spec, section 3 and section 5, "The check"):
**`crates/memoryd/src/lib.rs`:** add `pub mod check;` before `pub mod config;`, and
`pub mod entries;` after it. The file then lists `check`, `config`, `entries`, `socket`.
## The skeletons
## The skeleton, and the given `check.rs`
`entries.rs`: fill `parse`, `push`, `render`, `size`. `check.rs`: `Refused` and its sentences,
`DEFAULT_IGNORABLE`, `ALSO_INVISIBLE`, `MARKUP` and `PHRASES` are written; fill `invisible` and
`check`. Do not change the tables.
`entries.rs`: fill `parse`, `push`, `render`, `size`.
**Markup in this code.** `MARKUP` and the test build the chat-template tags from pieces
(`concat!("<", "think")`, `format!("{LT}think>")`), so that no file holds a tag literally. Keep it that
way: do not write a tag out whole in code, a comment, a command or your log. When you need to
name one, say "the opening think tag".
`check.rs` is **given complete**, and its tests pass as soon as it is copied. Do not change it, and
do not open its test or work through the test cases in your reasoning. Some of those cases are
chat-template tags, built from pieces so that no file holds one. Your own model uses the same tags
to mark its reasoning and its tool calls. If you spell one out, even in your thinking, it ends your
reasoning or your turn. That is what stopped this task twice before. If you ever need to refer to
them, call them "the markup strings".
## Steps
- [ ] **1. Copy** the four files; edit `lib.rs`.
- [ ] **2. See it fail.** `cargo test -p memoryd --test entries --test check`: `entries` 3 failed,
`check` 6 failed.
- [ ] **3. Fill** the six functions. `cargo fmt --all`.
- [ ] **2. See it fail.** `cargo test -p memoryd --test entries --test check`: `entries` 3 failed;
`check` 6 passed (it is given complete).
- [ ] **3. Fill** the four functions of `entries.rs`. `cargo fmt --all`.
- [ ] **4. See it pass.** The same command: 3 and 6 passed.
- [ ] **5. Run the gate.** `make gate`: `gate: ok`, 9 more tests than before (about 877).
- [ ] **6. Log and commit.** `git add -A crates/memoryd docs/implementer-log.md Cargo.lock && git commit`