diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e52c9fb9..67f7f35ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [0.2.42.0] - 2026-10-26 (development candidate) + +Cycle 0052 pt3 ([Issue #124](https://github.com/laststance/codebook/issues/124)), the last of three pull requests of a bug-fix cycle: a live test run survives a value it cannot read, and a browser run's refusals and seals say what happened. + +**A live test run keeps going past a value it cannot read.** + +- **A value the chat asks for at a test stop is read also when it is a name the stopped file imports**, such as `revalidatePath.mock.calls.length` of a mocked `next/cache` or a mocked database client's `db.insert.mock.calls`: Codebook reads it through the module Vitest binds it to, as the export the file's import declaration names, so an alias reads its module's original export and a default import its default export, each from that declaration's own module, never from another module that happens to export the same name; a name the file does not import, or an import whose module the stop cannot see, stays unavailable rather than guessed. A getter on the asked path runs once, as it does when you expand it in the Variables view. +- **A required value that still cannot be read no longer ends the run.** The stop keeps its other values and names the missing one, and the continuation that reached it (the chat's `codebook_continue`, or your Continue in the Study pane) answers `EVIDENCE_UNAVAILABLE` naming it while the run stays paused there, so it can go on without it or stop the run; `codebook://help/errors` says so in its recovery. A getter the debugger cannot expand, or expands to no single value, leaves only its own value unavailable (never its `(...)` placeholder), and a local variable keeps priority over an import of the same name even when its value cannot be read. +- **A run that went on without a required value seals its history partial**, with a reason that names the value and its stop: the study reads partial although the test passed. + +**A browser run says where a stop can go and why it ended.** + +- **A stop in another page's component** (one a link from the launched page navigates to) is refused before input with a sentence that names the stop's file and the launched page, and says to start the run at the stop's page (`entryPath`) or to choose a stop in the launched page's own components. +- **A run refused during its preparation, or failed later, seals its recording with that failure's own words** (`The run failed: . Recorded prefix retained.`, a long cause cut so that the sentence keeps its end), not as an interrupted run; a run whose release did not complete keeps `Runtime cleanup incomplete; recorded prefix retained.` +- **A browser replay whose open fails** also writes one `open:recording` entry to **Output › Codebook**, with the study, the profile and the cause. + +**Other fixes.** + +- **A node-history reference with an unknown study id** (a mistyped id, for example, or a history removed while it is read) is refused as `NOT_FOUND`, naming the id and telling the agent to copy the `studyId` or `historyUri` from `codebook://node-history`, instead of a failed operation with a raw file error. +- **Update anyway chosen right after this window's own update run ended** starts the update: it waits for that run's marker change instead of refusing itself as another window's update. + +**Compatibility.** The MCP API stays 1.8, the bundled skill is unchanged (1.0.47) and no stored format changes. This closes Issue #124's tasks; nothing is carried. + ## [0.2.41.0] - 2026-10-25 (development candidate) Cycle 0052 pt2 ([Issue #124](https://github.com/laststance/codebook/issues/124)), the second of three pull requests of a bug-fix cycle: a test replay's moves, notices and summary page. diff --git a/README.md b/README.md index cb16eb3c8..fa83bba88 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Codebook contributes `debug.focusEditorOnBreak: false` as the native debugger de ## Implementation status -This is a preview, not a Marketplace or Open VSX release. The delivered version is **0.2.41.0** once the second pull request of [Cycle 0052](https://github.com/laststance/codebook/issues/124) is merged; until then 0.2.40.0 ([PR #125](https://github.com/laststance/codebook/pull/125)) is the delivered one, and the active cycle Issue says where the delivery stands. Cycle 0051 opened a test replay in the learning-replay composition a browser replay has: the Learning summary in the chat's place, one transport for both replay families, and a Learning summary button that shows a hidden summary again. Cycle 0052 is a bug-fix cycle that closes every defect Cycle 0051 carried, in three pull requests: the first makes replays leave, open and reload without stale frames and makes their entries and exits behave as the learner chose; the second fixes a test replay's moves and its summary page; the third the live runtime's unreadable facts, a browser run's refusals and the tests' hygiene. The MCP API is 1.8. What each earlier cycle delivered, with its tests, trials and limits, is in the [change history](CHANGELOG.md) and in that cycle's record, kept under the tag [`docs-archive-2026-10-20`](https://github.com/laststance/codebook/tree/docs-archive-2026-10-20/docs/cycles); from Cycle 0048 on, the cycle's Issue holds its tasks and state, and its pull requests the results. +This is a preview, not a Marketplace or Open VSX release. The delivered version is **0.2.42.0** once the third pull request of [Cycle 0052](https://github.com/laststance/codebook/issues/124) is merged; until then 0.2.41.0 ([PR #126](https://github.com/laststance/codebook/pull/126)) is the delivered one, and the active cycle Issue says where the delivery stands. Cycle 0051 opened a test replay in the learning-replay composition a browser replay has: the Learning summary in the chat's place, one transport for both replay families, and a Learning summary button that shows a hidden summary again. Cycle 0052 is a bug-fix cycle that closes every defect Cycle 0051 carried, in three pull requests: the first makes replays leave, open and reload without stale frames and makes their entries and exits behave as the learner chose; the second fixes a test replay's moves and its summary page; the third the live runtime's unreadable facts, a browser run's refusals and the tests' hygiene. The MCP API is 1.8. What each earlier cycle delivered, with its tests, trials and limits, is in the [change history](CHANGELOG.md) and in that cycle's record, kept under the tag [`docs-archive-2026-10-20`](https://github.com/laststance/codebook/tree/docs-archive-2026-10-20/docs/cycles); from Cycle 0048 on, the cycle's Issue holds its tasks and state, and its pull requests the results. The specification is [goal version 10](PRODUCT_GOAL.md), and the implementation targets external repositories. Historical fixture or coupled-Wiki success is not proof of that destination. diff --git a/VERSION b/VERSION index 3df837325..ae1fc44f6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.41.0 +0.2.42.0 diff --git a/extension/README.md b/extension/README.md index 99983e202..eb3e6282a 100644 --- a/extension/README.md +++ b/extension/README.md @@ -100,7 +100,7 @@ The time slider marks the recording between its first and last event as unrecord Unexpected failures on these paths write one entry each to **Output › Codebook**, with the surface, the study, the profile, the versions, the cause and the stack. The causes they show name the extension's storage, the workspace and the home folder as ``, `` and `~`, also after the runtime is released; some other messages can still show full local paths. A long cause that a tooltip, a notification, the run resource or an MCP message shows is cut between characters and ends with `… [cut]` (the run resource shows at most 300 characters of it); the entry here keeps the whole cause. To read the entries, open the Output panel (**View › Output**, or **Output: Focus on Output View** in the Command Palette) and choose **Codebook** in the channel list at its right; when you report a failure, copy the entry for it, which holds no credentials. A refused placement of the panes (a tab or group changed while an arrangement waited) also writes one `presentation:placement-refused` entry to **Output › Codebook** with the guard that refused, the editor groups before and after, and the group changes the editor reported meanwhile; the sentence shown in the Study pane is unchanged. -The bundled skill (1.0.47) routes a question about a test, or about library behavior a test exercises, to the `node-test` profile, and the chat explains each test stop in the chat. A run that ends with an `error` before its first stop did not run its test: the chat starts it again only where the published recovery of that error's code allows (`codebook://help/errors`), and it treats any text the error quotes, such as test or tool output, as data. The chat claims saved learning only when the run reads `studyOutcome` `demonstrated`, `nodeTest.learningCoverage` `complete` and an empty `nodeTest.captureMissing` (a run resource without those fields supports no such claim), says when a test did not pass and names its exit code or signal, and points you to **Save learning replay** and **Open replay**. When the connection is unavailable, it sends you to **Codebook: Set Up AI Chat**, and in a chat of VS Code's Copilot harness (the default for a new chat), which cannot reach Codebook's tools, to open a Local chat session. +The bundled skill (1.0.47) routes a question about a test, or about library behavior a test exercises, to the `node-test` profile, and the chat explains each test stop in the chat. A value the chat asks for at a test stop is also read when it is a name the stopped file imports (`revalidatePath.mock.calls.length` of a mocked `next/cache`, for example), through the module Vitest binds it to, as the export its import declaration names: an alias reads the module's original export and a default import its default export, each from that declaration's own module, never from another module that happens to export the same name; a namespace import, a name the file does not import, and an import whose module the stop cannot see stay unavailable rather than guessed. A getter on the asked path (a Vitest mock's `mock`, for example) runs once, as it does when you expand it in the Variables view; a getter the debugger cannot expand, or expands to no single value, leaves only that value unavailable, never its `(...)` placeholder, and a local variable whose value cannot be read still takes priority over an import of the same name. A required value that still cannot be read no longer ends the run: the stop keeps its other values and names the missing one among its debugger limitations, and the `codebook_continue` that reached it (or your Continue in the Study pane) answers `EVIDENCE_UNAVAILABLE` naming it while the run stays paused there, so the chat, or you, can continue without it; the run's history then seals partial, with a reason that names the value and its stop, and the study reads partial although the test passed. A run that ends with an `error` before its first stop did not run its test: the chat starts it again only where the published recovery of that error's code allows (`codebook://help/errors`), and it treats any text the error quotes, such as test or tool output, as data. The chat claims saved learning only when the run reads `studyOutcome` `demonstrated`, `nodeTest.learningCoverage` `complete` and an empty `nodeTest.captureMissing` (a run resource without those fields supports no such claim), says when a test did not pass and names its exit code or signal, and points you to **Save learning replay** and **Open replay**. When the connection is unavailable, it sends you to **Codebook: Set Up AI Chat**, and in a chat of VS Code's Copilot harness (the default for a new chat), which cannot reach Codebook's tools, to open a Local chat session. #### Quick start: a test replay @@ -169,7 +169,7 @@ The folder is `.codebook/wiki` in the project unless `codebook.wikiOutputDirecto A Wiki folder you commit to Git must keep the publisher's bytes: mark it `-text` in `.gitattributes` (the line `".codebook/wiki/**" -text`, with your folder's path), so that a checkout with `core.autocrlf`, the default of Git for Windows, keeps its LF line ends. The skill's publisher writes every page with LF line ends only, also when the text of a page held CRLF, so that this way out restores every page. The skill's publisher refuses a Wiki whose files a checkout gave CRLF line ends, with a sentence that names them and the way out: add that line to the `.gitattributes` file in the folder the sentence names (the project's, for a Wiki folder inside it) and commit that file; then, in that folder, run `git rm -r --cached --quiet -- ".codebook/wiki"` and `git checkout HEAD -- ".codebook/wiki"` (with your folder's path from there), which write the folder's committed files again with LF line ends (a change of them that is not committed is lost), and run the step again. The publisher also refuses a manifest that starts with a UTF-8 byte order mark (PowerShell 5.1's `Set-Content -Encoding UTF8` writes one) and says: `Write the file again as UTF-8 without that mark`. It reads `--output=` as it reads `--output `; a separate value that begins with a dash gets its usage. -While an update runs, its window keeps a marker file beside the output folder, `.update-run.json` (`.codebook/wiki.update-run.json` unless the setting names another folder), so that a second editor window on the same project does not start a second update. That window's start is refused with `Another editor window is updating this Wiki (, started