Repository navigation
Conversation
…roposal working-memory-kit plans to put `status:`, `date:` and `superseded_by:` lines directly under each entry heading. `readEntry` copied the whole section into the Proposal body, so those lines would land in the Bank. It also took any `promoted_to:` line anywhere in the section as the stamp, which missed `- promoted_to:` and `**promoted_to:**` and refused an entry whose prose happened to start a line with the key. `readEntry` now reads the run of lines under the heading whose key is one of `status`, `date`, `superseded_by` or `promoted_to`, in plain, list or bold form. That block stays out of the body, a stamp counts only inside it, and the new stamp goes in as the block's last line so the blank line before the prose survives. The key set is closed, so `owner: x` stays body text. An entry with no block reads and stamps as before. Refs #176.
…sionLog template Nothing tested `ltm promote --entry` against the log working-memory-kit ships, only a hand-written fixture. `fixtures/working-memory-kit/decisionLog.md` is a byte-identical copy of its `template/_working-memory/decisionLog.md`, with the source commit in `SOURCE.txt` beside it so a refresh can be checked with a plain diff. The CLI test confirms the template's fenced example isn't an entry, then fills in an entry with a metadata block and checks that the block stays out of the Record body and the stamp lands after `date:`. With the old `readEntry` the test fails on `status: accepted` in the body. Refs #176.
…osition The guide said the stamp goes right under the heading and that any `promoted_to` refuses an entry, which stopped being true with the metadata block. It now names the four keys and three line forms, says the block stays out of the Proposal, and shows the stamp as the block's last line. It also says which headings `--entry` matches by bare title. Refs #176.
…colon
The metadata-block rewrite made META_LINE require `: ` after the key. Before it, readEntry found the stamp with `startsWith("promoted_to:")`, so a hand-typed `promoted_to:acme:x` under the heading blocked a second Promotion. The plain and list forms now accept the key with or without a space, and a new readEntry test covers the no-space and bare-key cases. Also rewords the META_LINE and fence comments.
Owner
Author
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
ltm promote --entrynow reads the metadata block that working-memory-kit plans to put under each decision-log heading. Without this, promoting an entry that hasstatus:anddate:lines publishes them as Record body text, and a stamp written as- promoted_to:or**promoted_to:**lets the same entry be promoted twice.The block is the run of lines straight under the heading whose key is one of
status,date,superseded_by, orpromoted_to, in plain, list (- key:), or bold (**key:**) form.readEntryinsrc/core/promote.tsnow leaves the block out of the Proposal body, looks for an existing stamp only inside it, and writes the new stamp as the block's last line. An entry with no block behaves as before. The key set is the contract with working-memory-kit, soowner: xin the same position stays body text.Closes #176
Where to Look
Start with
readEntryinsrc/core/promote.ts, about 20 lines. The part I'm least sure about is how looseMETA_LINEis. Plain and list forms match with no space after the colon, so a hand-typedpromoted_to:acme:xstill refuses a second promotion, as it did before this change. The bold form still needs the space after**promoted_to:**. The old parser never saw a bold stamp in any spacing, so that case is no worse than before.fixtures/working-memory-kit/decisionLog.mdis a byte copy of working-memory-kit'stemplate/_working-memory/decisionLog.mdat 19a9a80, withSOURCE.txtnaming the SHA. A new CLI test promotes from it.Verification
An independent reproducer ran each claim from the build report. Each claim below is marked by where its last run happened:
callerdrove theltm promoteCLI path (fromsrc/cli/promote.ts:69throughpromoteSourceintoreadEntry), andseamran a test or check with no production caller in front of it.caller). Withsrc/core/promote.tsreset to the base commit,bun test test/cli/promote.test.ts -t 'pinned working-memory-kit'fails attest/cli/promote.test.ts:201withExpected to not contain: "status: accepted", so the metadata block was in the Proposal body. At HEAD it passes.test/cli/promote.test.tspasses in full (caller):bun test test/cli/promote.test.tsgives 15 pass, 0 fail. The new test spawnsltm promote <log> --entry 'Cap retries at three per request' --bank <clone> --json.readEntrybuilds body, stamp lookup, and stamp position from the block (caller): same CLI run as above, plus a direct read of the diff.caller). A realltm promote log.md --entry Aon an entry holdingpromoted_to:acme:xexits 1 withltm promote: log.md already has promoted_to 'acme:x'and leaves the repo clean. The testa promoted_to line with no space after the colon, or no value, still gives existingfails on the previousMETA_LINEand passes at HEAD, 62 pass intest/core/promote.test.ts.caller): calling the realreadEntryreturnsacme:xfor"**promoted_to:** acme:x"and for"- promoted_to:acme:x", andnullfor"**promoted_to:**acme:x".readEntry metadata blocktests and the bold-form refusal pass (seam):bun test test/core/promote.test.tsgives 61 pass, 0 fail in that round. The tests callreadEntryandpromoteSourcedirectly. The bold-form refusal was not driven through the CLI.seam):cmp fixtures/working-memory-kit/decisionLog.md <(gh api 'repos/kendrick/working-memory-kit/contents/template/_working-memory/decisionLog.md?ref=19a9a80a3c021b6b105bfa155b60fd60c3fb8ac2' -H 'Accept: application/vnd.github.raw')printsidentical. A fixture has no production caller.guide/promotion.mddocuments the block (seam):grep -n 'metadata block' guide/promotion.mdhits lines 66 and 94. Docs have no production caller.The full suite,
bun run typecheck && bun test, passed in this worktree at the commit being pushed:tsc --noEmitclean, then 1746 pass, 3 skip, 0 fail across 1749 tests in 89 files.Not Independently Verified
.gitremoved, wheretest/cli/discover.test.ts"discover leaves the repo byte-identical" fails ongit statusalone.src/core/promote.ts.Plan Concerns
promote.ts:102, but that line belongs todatedTitle. The comment went on the newMETA_LINEconstant abovereadEntryinstead.SOURCE.txtwas hard-wrapped. It ships as one line per paragraph.Left Out
META_LINEruns three times per block line and spells the key list twice. All three forms are tested, so a key added to one alternation and missed in the other fails a test.statusorsuperseded_byinto the Proposal's frontmatter, H3 entries, and thepromoted_fromanchor slug are out of scope per the issue's Non-Goals.