Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2b6617d to
9bd94e9
Compare
…ugh a child folder (DW-574) ticketmodel gains ParentView/ChildInitiative/InitiativeEdge and parse_parent_next for tickets.py next on a parent (folder-less children are data). TicketTree takes an optional child folder, passed as the <dir> positional to next/status/find/mark (argv unchanged without one), keeps the pin on the parent, and adds parent_next(). default_ticket_tree takes an optional folder keyword. Call sites are unchanged.
…ild (DW-574) RunState gains parent_initiative (str | None, None by default): the parent initiative whose child the run builds. to_dict always writes it, as RunState writes every key; from_dict reads an absent or empty key as None, so an older state.json loads unchanged. ProjectPaths.with_initiative re-roots a v7 snapshot on a child initiative: the parent folder's sibling, with both artifact dirs, the ledger and the sprint path on it. It is pure and refuses anything that is not a single folder name. New pure module initiativechain: next_child walks a ParentView's ready children in build order. It passes over a folder-less child (no-folder) or one the caller's probe passes over, and reports both, along with the waiting children. When it takes none, the chain-end reason is waiting, passed-over or all-done. status --json: the run-level tickets object gains parent_initiative (string or null). The key is additive, so STATUS_SCHEMA_VERSION stays 1 (machine.py: additive-only evolution). The engine's TicketTreeFactory becomes a Protocol with a folder keyword. The run-pinned tree seams take a folder keyword too: the engine's ticket_tree and _workspace_ticket_tree, cli._status_ticket_tree, runs._rearm_ticket_tree, tui.data._board_ticket_tree and tui.app._replan_ticket_tree. Every caller passes folder=None, so behaviour is unchanged.
…nto the mount config (DW-574)
…der worktree isolation (DW-574)
… and pin (DW-574) Add runs.paths_for_state: a chained run (parent_initiative set) reopens on its child initiative's paths (ProjectPaths.with_initiative), any other run on the loaded paths unchanged. A chained run whose live [core] active_initiative no longer names its parent, or whose child cannot be located, raises BmadConfigError naming the value to restore rather than returning the loaded paths: the engine would otherwise read and write the other initiative's ledger and sprint path before its tree pin could pause it. Every site that reopens a recorded run applies it: resume (the engine is built on the child's paths while the launch-parity gates and tickets preflight still judge the loaded parent's, and a moved parent refuses ahead of every side effect), the resolve restore-patch/sweep-pin/trust/code-root/abandon/reverify loads, the status sprint footer, the runs held-closes/sweep-ledger/reverify loaders, and the TUI replan and re-arm guards. tree_pin moves to runs (re-exported from tickets_engine) and now raises ValueError on a chained state whose paths are not re-rooted on its child; TicketsEngine checks this at construction, before the base engine touches the paths. New runs.recorded_tree_pin pins a recorded run's tree as the engine does: tree_pin over the child's paths in the main checkout, the child with no folder in a worktree mount. The status board, the re-arm (pinned before its first write; a config fault refuses as RearmError with the escalation still armed) and the TUI replan (pinned from the state re-read under the lock; the modal no longer passes an initiative) route through it. cli._status_ticket_tree now takes (project, pinned_initiative, folder) like the other tree factories.
…d8bbb scope (DW-574) The bom shape of test_mark_initiative_done_closes_a_drained_child_for_the_script spelled U+FEFF as a literal, invisible character; an editor or formatter stripping it would turn the [bom] row into a silent copy of [lf]. It is now the escape \ufeff, and the row asserts its pre-image starts with codecs.BOM_UTF8 exactly when the shape is bom. The file holds no other literal U+FEFF. Records what fea88791 changed beyond its subject: - verify.set_frontmatter_field gained an opt-in keep_bom keyword: a leading UTF-8 BOM is set aside before the frontmatter split and written back ahead of the edit. - tests/test_portability_guard.py::test_journal_routing_tables_are_read_from_diagnostics was relaxed: a journal schema field may now be accounted for by a JOURNAL_KIND_BENIGN_FIELDS row for that kind. - diagnostics.py routes the new initiative-mark journal kind: parent and slug are aliased in the initiative namespace, and file is left off the kind's schema, so it reduces to file_present. - The initiative-mark row's parent field is the parent folder's name, not its path. Records what 96dd8bbb changed beyond its subject: - ticketstore.classify_store and assess_store gained chained=, and the T1 branch no longer returns early, so a chained run under worktree isolation gets the user-config-tracked / user-config-not-ignored refusals on T1. - That refusal's text changed for unchained shared layouts too; it now reads "the shared ticket store or a chained run's child initiative". - store_conflict gained initiative= and re-roots the paths on that child. - ticketstore.redirect_mount_store was renamed redirect_mount_config, with keyword-only main_store= and initiative=; a blank initiative passed to it raises TicketStoreError.
9bd94e9 to
247f577
Compare
|
@codex review |
Codex Review SummaryThis 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. Swish! 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". |
Part 4 of 8 of the deferred-work ledger stack. Parts 4-6 are DW-574: tickets mode builds a parent initiative's children instead of refusing it.
What
The groundwork for a parent initiative chain. Nothing in this PR runs a chain yet.
Why
runon a v7 parent initiative exits 1. A chain needs: the parent'snextparsed, a tree routed through a child folder, a run that records its parent, a drained child closed, and every recorded-run site reopened on the child's own paths and pin.How
ticketmodelparsestickets.py nexton a parent (ParentView/ChildInitiative/InitiativeEdge).TicketTreetakes an optional child folder and keeps the pin on the parent.RunState.parent_initiativeis new. An older state.json loads unchanged.ProjectPaths.with_initiativere-roots a v7 snapshot on a child initiative.status: done.set_frontmatter_fieldgains an opt-inkeep_bom.runs.paths_for_statereopens a chained run on its child's paths. If the liveactive_initiativeno longer names its parent, it raisesBmadConfigErrornaming the value to restore.Testing
uv run pytest -q -n logicalat this PR's tip: 17535 passed, 124 skipped.uv run pyright(1.1.411): 0 errors.Changelog
n/a here. The DW-574 entry lands in part 6, once the chain is complete.