perf: streamline Forge across all depths - #8
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b56a6f4b2f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| candidate = (planning_dir / raw_source).resolve() | ||
| if candidate == (path.resolve() if path else None) or candidate.is_relative_to((planning_dir / "sections").resolve()): |
There was a problem hiding this comment.
Keep compact sources inside the planning directory
When compact metadata uses a traversal such as source: ../other.md, resolving the candidate without checking containment allows strict artifact gates to accept an unrelated external Markdown file as the authoritative spec. context-brief and implementation-packet then embed that file's contents, so a typo or untrusted plan can drive implementation from the wrong requirements and disclose unrelated Markdown; reject candidates whose resolved path is outside planning_dir.
Useful? React with 👍 / 👎.
| compact = compact_plan_descriptor(planning_dir) | ||
| if compact and not compact["errors"]: | ||
| paths = planning_artifacts(planning_dir) | ||
| state.update({name: paths.get(name) for name in ("plan", "research", "tdd", "integration_notes", "review")}) |
There was a problem hiding this comment.
Recognize embedded reviews during compact-plan resume
For a multi-section compact plan, the descriptor contains a Review heading before the section index or all section files necessarily exist, but compact["errors"] remains nonempty until the section manifest is complete. This condition therefore leaves state["review"] unset, causing both plan-setup and status to direct the user to review the plan again instead of creating or finishing the sections, potentially producing a duplicate physical review that the compact contract is meant to avoid.
Useful? React with 👍 / 👎.
Reduce repeated process startup and duplicated planning context across all depths. Add canonical compact plans and proactive code cleanup with regression checks; split the monolithic helper into a verified, lazy-loaded runtime while preserving detached integrity checks.
Validation: 486 tests passed, one skipped; nine release checks and strict example gates passed. Independent review found no remaining material issues. Local planning postflight benchmarks are 4.43–4.45× faster across lean, standard and deep modes; measurements and source hashes are in
examples/evals/performance.json.