Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
0c327cd
fix(branch): name a line's parent in the guide entries
yyhhyyyyyy Nov 22, 2026
f94f857
Merge remote-tracking branch 'origin/hui/branch-default-eval' into hu…
yyhhyyyyyy Nov 22, 2026
5397bf5
docs(branch): state the opening policy and the status-note texts
yyhhyyyyyy Nov 22, 2026
aecad5c
feat(branch): state the opening policy and the status notes
yyhhyyyyyy Nov 22, 2026
e515a89
test(branch): cut the user line from an idle root
yyhhyyyyyy Nov 22, 2026
c6bbe55
test(app-server): widen the export fixture's window
yyhhyyyyyy Nov 22, 2026
cad5cf9
refactor(branch): write a status note from its line
yyhhyyyyyy Nov 22, 2026
47222fc
Merge remote-tracking branch 'origin/hui/branch-default-eval' into hu…
yyhhyyyyyy Nov 22, 2026
1cca0a6
docs(branch): name an opener as the roster closing's reader
yyhhyyyyyy Nov 22, 2026
2bfe94a
Merge remote-tracking branch 'origin/hui/branch-default-eval' into hu…
yyhhyyyyyy Nov 22, 2026
67c31b2
fix(xtask): compare each arm with the text it was given
yyhhyyyyyy Nov 22, 2026
e757029
fix(xtask): refuse a pool whose runs recorded different texts
yyhhyyyyyy Nov 22, 2026
789a919
docs(prompts): record the baseline flag and a pool's text rows
yyhhyyyyyy Nov 22, 2026
94796e4
docs(prompts): state the pool's one text set per arm
yyhhyyyyyy Nov 22, 2026
48d3fdc
fix(branch): omit the guidance heading from an empty note block
yyhhyyyyyy Nov 22, 2026
6160e26
test(xtask): add the branch policy evaluation baselines
yyhhyyyyyy Nov 22, 2026
8b66ef1
fix(xtask): keep a pool's text provenance separate
yyhhyyyyyy Nov 22, 2026
278305f
test(xtask): refuse a rejudge that mixes text provenance
yyhhyyyyyy Nov 22, 2026
ebef1f4
Merge remote-tracking branch 'origin/hui/branch-default-eval' into hu…
yyhhyyyyyy Nov 22, 2026
cb02c3a
Merge remote-tracking branch 'origin/hui/branch-default-eval' into hu…
yyhhyyyyyy Nov 23, 2026
88cd4df
test(branch): drive the switched-line compaction with the flow model
yyhhyyyyyy Nov 23, 2026
82907b8
test(xtask): add the user-line switch scenario and its fixture flow
yyhhyyyyyy Nov 23, 2026
638ae49
feat(xtask): move the default branch to a user line and wake the form…
yyhhyyyyyy Nov 23, 2026
5d447ff
test(branch): assert the user-line and former-default notes reach the…
yyhhyyyyyy Nov 23, 2026
dbcfcbb
docs(branch): describe the user-line move and its scenario
yyhhyyyyyy Nov 23, 2026
9e4a85a
style: apply rustfmt to the new note flows
yyhhyyyyyy Nov 23, 2026
30f256d
test(branch): give the appended-note test a quiet window
yyhhyyyyyy Nov 23, 2026
da1e596
test(xtask): script the chained move to a tool line opened before it
yyhhyyyyyy Nov 23, 2026
14a5b79
fix(xtask): resolve a chained move to the tool line the run has seen
yyhhyyyyyy Nov 23, 2026
3f64035
test(xtask): keep the scripted peer sockets within the unix path length
yyhhyyyyyy Nov 23, 2026
8905160
test(xtask): hold a switch's note past its acknowledgment
yyhhyyyyyy Nov 23, 2026
f5aed3b
fix(xtask): wait for a move's notes before its follow-ups
yyhhyyyyyy Nov 23, 2026
c988029
Merge remote-tracking branch 'origin/main' into hui/branch-opening-po…
yyhhyyyyyy Nov 23, 2026
7c0c245
test(xtask): end a run's turns before the move's note
yyhhyyyyyy Nov 23, 2026
f05221e
fix(xtask): fail a move whose scored follow-ups never leave
yyhhyyyyyy Nov 23, 2026
d8783cb
fix(xtask): report a switch that never moved as not reached
yyhhyyyyyy Nov 23, 2026
85fb628
Merge remote-tracking branch 'origin/main' into hui/branch-opening-po…
yyhhyyyyyy Nov 24, 2026
1148425
refactor(branch): keep the opening policy out of the shipped texts
yyhhyyyyyy Nov 24, 2026
858dae9
chore(branch): drop the branch-policy baseline fixtures
yyhhyyyyyy Nov 24, 2026
cca6659
docs(branch): say that a shipped status note carries no guidance block
yyhhyyyyyy Nov 24, 2026
0a0bc83
test(branch): pin the product's empty note configuration
yyhhyyyyyy Nov 24, 2026
867a6f5
fix(branch): keep the former-line note to the end guard
yyhhyyyyyy Nov 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 93 additions & 56 deletions crates/dim-agent-capabilities/src/timeline_tree.rs

Large diffs are not rendered by default.

524 changes: 502 additions & 22 deletions crates/dim-agent-capabilities/tests/branch_flow.rs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/architecture/rust-agent/plugins/BranchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ eligibility and the cap in the lock that reserves the new line, so a switch or a
create cannot slip between a check and the reservation; publication charges nothing a
second time, and a creation that fails releases its slot.

`end` ends the calling line and nothing else, so it guards the caller as well as the
target: only a tool line ends itself, a plugin line follows its own protocol, and a line
`end` ends the calling line and every line below it, so it guards the caller as well as
the target: only a tool line ends itself, a plugin line follows its own protocol, and a line
the user opened is ended by the user. A line that is the default branch, or that has a
descendant which is, is refused, because ending a line ends every line below it.

Expand Down
8 changes: 4 additions & 4 deletions docs/design/model-prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ SessionTitle is out of scope: its `SYSTEM` (`crates/dim-session-title/src/lib.rs

- **Protocol.** The marker names and attributes, the identity blocks' factual sentences, the branch tool's actions and modes, and its refusal codes change only with the branch mechanism, in the same change as the flow tests that assert them (§4).
- **The coordination text for `main` covers the items of [Timeline branches §12.2](timeline-branches.md#122-items-for-the-prompt-layer-429).**
- **Evaluation.** These texts are policy: a change is evaluated with the sixteen scenarios of [Timeline branches §12.3](timeline-branches.md#123-evaluation-scenarios), current against candidate (§8).
- **Evaluation.** These texts are policy: a change is evaluated with the seventeen scenarios of [Timeline branches §12.3](timeline-branches.md#123-evaluation-scenarios), current against candidate (§8).

### 9.5 Goal

Expand Down Expand Up @@ -252,9 +252,9 @@ SessionTitle is out of scope: its `SYSTEM` (`crates/dim-session-title/src/lib.rs

**Owner:** the evaluation tooling, `xtask`; implemented under [#550](https://github.com/arcships/dim/issues/550).

- **A scenario runner** with the candidate injection and the test of §8.1: the scenarios are the cases, both arms run the shipped assembly, and the result is reported in the pull request. It interleaves the arms run by run and accepts `--jobs` and repeated `--text`/`--candidate` pairs, so a change that spans two texts of one owner is judged as the one change it is (Goal §A.5.2).
- **A scenario may move the default branch mid-run.** Its `switch` step names the target line, by role (`latest_tool_line`) or id, and the runner calls `session.branch_set_default` at that line's first `turn/start` before sending the next input; the move is retried a few times while the line is not registered yet, and a line that never registers ends the run with its own outcome. An input that names no line lands on the default branch, and one that names a line keeps that target.
- **A finished evaluation's saved runs are judged again or pooled.** `--rejudge DIR` judges them from the views they saved, with no model turn, keeping each run's own outcome and writing to a new `--out`; `--pool DIR` adds a finished evaluation's saved runs to a report under the same rule and format, and the flag may be repeated to pool several evaluations, writing to none of them, and an `--out` that resolves inside a source, through `..` or a link, is refused before anything is created. Such a report names its sources, has no text or candidate-token row, and in a pool its model and judge rows are the ones given, while each source's own report states the instrument its runs were judged with. Such a report also gives the declines the runner sent again and how many runs did not record it.
- **A scenario runner** with the candidate injection and the test of §8.1: the scenarios are the cases, both arms run the shipped assembly, and the result is reported in the pull request. It interleaves the arms run by run and accepts `--jobs` and repeated `--text`/`--baseline`/`--candidate` triples, so a change that spans two texts of one owner is judged as the one change it is (Goal §A.5.2).
- **A scenario may move the default branch mid-run.** Its `switch` step names the target line, by role (`latest_tool_line`, or `user_line` for the line the scenario's `session.branch_create` call opened) or id, and the runner calls `session.branch_set_default` at that line's first `turn/start` before sending the next input; a scenario with more than one move states them in `moves`, where each later move runs right after the one before it. The move is retried a few times while the line is not registered yet, and a line that never registers ends the run with its own outcome. An input that names no line lands on the default branch, and one that names a line keeps that target. A move may carry `formerMessage`, an input sent to the line it moved away from after its own input: a move's note goes in as `append` input, which never starts a turn, so an idle line needs that input to answer.
- **A finished evaluation's saved runs are judged again or pooled.** `--rejudge DIR` judges them from the views they saved, with no model turn, keeping each run's own outcome and writing to a new `--out`; `--pool DIR` adds a finished evaluation's saved runs to a report under the same rule and format, and the flag may be repeated to pool several evaluations, writing to none of them, and an `--out` that resolves inside a source, through `..` or a link, is refused before anything is created. Such a report names its sources instead of the instrument's text and candidate-token rows, states the configured texts each arm's saved runs recorded (or that an arm's runs recorded none), and in a pool its model and judge rows are the ones given, while each source's own report states the instrument its runs were judged with. Such a report also gives the declines the runner sent again and how many runs did not record it. A report states one set of configured texts per arm, so a pool whose runs of one arm recorded different texts is refused, and so is a pool that mixes runs which recorded their texts with runs written before the runner recorded them: such evaluations are reported separately, while a pool of runs that all recorded none stays supported as unrecorded.
- **A run's file roots.** Each live run serves with three kinds of file-tool root: its workspace, which the model may read and write; its disposable home, which `~` resolves against and which the model may read; and the platform's fixed read-only roots, which carry the toolchain the run's commands read, such as the interpreter's own installation. A file-tool path outside them is refused with `outside_file_roots`, and the refusal leaves what is outside untouched. The roots bound the model's file-tool calls — `read`, `write`, `edit`, `glob` and `grep`; `exec` is bounded by the sandbox, and the client-initiated paths, `@` mention expansion and the App Server's `session.files.*` methods, are not calls the model makes and stay outside the roots.
- **No absolute pass line and no CI run** (§8.1).

Expand Down
Loading