Skip to content

fix(commands,workflows): follow-ups from the #2404 review - #2411

Merged
Wirasm merged 2 commits into
devfrom
fix/2404-followups
Aug 3, 2026
Merged

fix(commands,workflows): follow-ups from the #2404 review#2411
Wirasm merged 2 commits into
devfrom
fix/2404-followups

Conversation

@Wirasm

@Wirasm Wirasm commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Four findings from CodeRabbit's review of #2404, all verified against the files before acting. Two were Major and one of those meant half the planning path never received #2404's fix at all.

1. archon-create-plan never classified a GitHub issue (Major)

Its Phase 0.1 input table had five rows — PRD, PRD-with-phases, file path, free-form, empty — and none matched a number or URL. So 1234 fell through to "Free-form text → use directly as feature input", and the comment-authority section #2404 added was unreachable on the entire non-bug planning path. I added a section gated on a classification the command could not produce.

Added the two missing rows, and made the match order explicit (first match wins).

2. Comments are now weighed, not obeyed

The first version made a maintainer comment mechanically authoritative. That is too much: comments can be stale, contradicted by code that has since changed, or simply wrong — and the planner is the one actually reading the code.

Reworked so that reading every comment stays mandatory, authorAssociation weights rather than decides (write-access decisions are the default course; CONTRIBUTOR/NONE is input rather than instruction, since anyone can comment on a public repo), and the planner may disagree. What is forbidden is ignoring a decision silently — follow it, or say why not. That is the actual failure this guards against.

3. Cross-repo linked issues (Major)

A bare #1234 means the current repo; a full URL may not. Extracting the number from https://github.com/other/repo/issues/456 and running gh issue view 456 reads the wrong repo's issue. Pass the URL verbatim.

4. prep-worktree was advisory (Major)

It only asked the model to "report whether the install succeeded". A non-zero install can be narrated as a failure while the node still records success, and implement then runs against a broken dependency tree — where the resulting build/type-check/test failures get misattributed to the implementation instead of the environment.

This is the same class of bug #2404 existed to fix, in a third node in the same file that I missed. Added assert-deps-installed, and rewired implement to depend on it instead of prep-worktree directly (a sibling node would not have gated anything). It checks a marker the prompt writes and independently verifies node_modules exists when package.json does — so a model that narrates success without writing the marker is still caught.

5. Stale rationale on assert-implemented (Minor)

The comment claimed only the working tree is inspected; the guard also counts commits ahead of the base. That branch exists because three consecutive runs committed their work, leaving a clean tree and failing runs that had genuinely done the job. Now documented so it is not deleted as dead weight.

Validation

bun run check:bundled                                    # up to date (36 commands, 21 workflows)
bun run cli validate workflows archon-fix-github-issue-experimental   # 1 valid, 0 errors
bun run cli validate commands archon-create-plan          # ok
bun run cli validate commands archon-investigate-issue    # ok
prettier --check                                          # clean

The one remaining validator warning is pre-existing on fetch-issue.

A run against a real issue follows; if the planning path still misses context, that is evidence the prompt-level approach is insufficient and #2410 (command nodes cannot receive upstream context) is the real fix.

Summary by CodeRabbit

  • New Features
    • GitHub issue numbers and issue or pull request URLs are now recognized automatically for planning and investigation.
    • Issue workflows now review all comments, consider author context, document conflicting decisions, and follow linked issues across repositories.
  • Bug Fixes
    • Implementation is now blocked when dependencies fail to install or required dependencies are missing.
    • Worktree and commit changes are checked more reliably before implementation proceeds.

**archon-create-plan never classified a GitHub issue.** Its input table had five
rows and none matched a number or URL, so `1234` fell through to "Free-form text
→ use directly" and the comment-authority section added by #2404 was unreachable
on the entire non-bug planning path. Added the two missing rows and made the
match order explicit.

**Comments are now weighed, not obeyed.** The first version of this made a
maintainer comment mechanically authoritative, which removes the planner's
judgement — comments can be stale, contradicted by code that has since changed,
or simply wrong, and the planner is the one actually reading the code. Reading
every comment stays mandatory; `authorAssociation` weights it (write-access
decisions are the default course, `CONTRIBUTOR`/`NONE` is input rather than
instruction, since anyone can comment on a public repo); disagreeing is allowed;
what is forbidden is ignoring a decision *silently*. Follow it, or say why not.

**Cross-repo linked issues.** A bare `#1234` means the current repo, but a full
URL may not — pass the URL to `gh issue view` verbatim rather than extracting the
number and reading the wrong repo's issue.

**prep-worktree was advisory.** It only ASKED the model to report whether the
dependency install succeeded, so a non-zero install could be narrated as failure
while the node recorded success and `implement` ran against a broken tree — where
the resulting build/type-check/test failures get blamed on the implementation.
Added `assert-deps-installed`, and `implement` now depends on it rather than on
`prep-worktree` directly. It checks a marker the prompt writes AND independently
verifies node_modules exists when package.json does, so a model that narrates
success without writing the marker is still caught. Same class as
capture-pr-number and assert-implemented.

**Stale rationale on assert-implemented.** The comment claimed only the working
tree is inspected; the guard also counts commits ahead of the base branch. That
branch exists because three consecutive runs committed their work, leaving a
clean tree and failing runs that had genuinely done the job. Documented so it is
not removed as dead weight.
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 021b11a9-e769-459e-b382-00a31ce52ebc

📥 Commits

Reviewing files that changed from the base of the PR and between fc8c56d and e0dbb9b.

⛔ Files ignored due to path filters (1)
  • packages/workflows/src/defaults/bundled-defaults.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing (2)
  • .archon/commands/defaults/archon-create-plan.md
  • .archon/workflows/experimental/archon-fix-github-issue-experimental.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • .archon/commands/defaults/archon-create-plan.md
  • .archon/workflows/experimental/archon-fix-github-issue-experimental.yaml

📝 Walkthrough

Walkthrough

The issue commands classify GitHub references and evaluate comments, linked issues, and current code evidence. The experimental workflow records installation failures and blocks implementation when dependencies are unavailable.

Changes

Issue handling and implementation workflow

Layer / File(s) Summary
GitHub issue context handling
.archon/commands/defaults/archon-create-plan.md, .archon/commands/defaults/archon-investigate-issue.md
The commands recognize issue numbers and GitHub URLs. They require comment review, author-association checks, explicit conflict resolution, and one-level linked-issue traversal.
Dependency installation gate
.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml
The workflow records failed installs, validates .prep-failed and node_modules, gates implement, and documents working-tree and commit checks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PrepWorktree
  participant AssertDepsInstalled
  participant Implement
  PrepWorktree->>AssertDepsInstalled: write .prep-failed when installation fails
  AssertDepsInstalled->>AssertDepsInstalled: check .prep-failed and node_modules
  AssertDepsInstalled->>Implement: allow implementation when dependencies are installed
Loading

Possibly related PRs

  • coleam00/Archon#2404: The main PR directly extends the same issue-planning and investigation guidance while also adding dependency-installation safeguards.

Suggested labels: bug, area: workflows

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the changes and validation, but it omits most required template sections, including UX, architecture, metadata, security, compatibility, rollback, and risks. Complete the required template sections and document security, compatibility, human verification, side effects, rollback, and risks.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately identifies this as a follow-up to the #2404 review and names the affected commands and workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/2404-followups

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.archon/commands/defaults/archon-create-plan.md:
- Around line 69-73: Update the linked-issue fetching flow in
archon-fix-github-issue-experimental.yaml to pass the original issue URL through
fetch-issue instead of only the extracted issue number, and invoke gh issue view
with that URL unchanged so cross-repository references preserve their repository
identity. Add an end-to-end test covering a linked issue from a different
repository.
- Around line 38-39: Update the GitHub issue or PR URL handling in the plan so
URLs containing /pull/{number} use a PR-specific fetch via gh pr view, ensuring
PR reviews are included; retain gh issue view for issue URLs and bare
issue-number inputs.

In @.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml:
- Around line 93-108: Update the assert-deps-installed step to validate the
actual dependency installation using the selected package manager, including Bun
when package.json and bun.lock are present rather than assuming node_modules.
Detect dependency manifests in nested worktrees/packages, verify each applicable
install target or manager-specific status, emit a checked installation status,
and make implement depend on that validation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 60411c3a-43a9-40ad-9781-60cb1760201b

📥 Commits

Reviewing files that changed from the base of the PR and between 4d687b1 and fc8c56d.

⛔ Files ignored due to path filters (1)
  • packages/workflows/src/defaults/bundled-defaults.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing (3)
  • .archon/commands/defaults/archon-create-plan.md
  • .archon/commands/defaults/archon-investigate-issue.md
  • .archon/workflows/experimental/archon-fix-github-issue-experimental.yaml

Comment on lines +38 to +39
| A bare number (`1234`, `#1234`) | **GitHub issue** | **Go to 0.1a** |
| A GitHub issue or PR URL | **GitHub issue** | **Go to 0.1a** |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

: "${PR_URL:?Set PR_URL to a pull-request URL}"

gh issue view "$PR_URL" --json comments \
  --jq '{issue_comments: (.comments | length)}'

gh pr view "$PR_URL" --json comments,reviews \
  --jq '{conversation_comments: (.comments | length), reviews: (.reviews | length)}'

Repository: coleam00/Archon

Length of output: 208


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== file location =="
fd -a 'archon-create-plan.md' . || true

echo "== relevant file lines =="
file="$(fd 'archon-create-plan.md' . | head -n 1)"
if [ -n "${file:-}" ]; then
  sed -n '1,120p' "$file" | nl -ba
fi

echo "== searches for gh issue/pr view/json in archon commands =="
rg -n "gh (issue|pr) view|--json|comments|reviews|/#|A bare number" .archon/commands/defaults || true

echo "== gh availability/version =="
if command -v gh >/dev/null 2>&1; then
  gh --version | sed -n '1,8p'
else
  echo "gh not installed"
fi

Repository: coleam00/Archon

Length of output: 9767


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== create-plan full file =="
file="$(fd 'archon-create-plan.md' . | head -n 1)"
wc -l "$file"
sed -n '1,120p' "$file" | nl -ba

echo "== PR_URL routing in create-plan commands =="
rg -n "PR_URL|issue view|pr view|comments|reviews|/pull/" "$file" || true

Repository: coleam00/Archon

Length of output: 215


🌐 Web query:

GitHub CLI gh issue view supports pull request URL gh issue view https://github.com owner/repo/pull/123

💡 Result:

The GitHub CLI command gh issue view accepts a URL as an argument [1][2]. Because GitHub treats issues and pull requests as sharing the same global namespace for numbering, the gh issue view command can successfully parse and display information for a pull request when provided with its URL [3][4]. While gh issue view will retrieve and display data for a pull request URL, it is primarily designed for issues [1][2]. Consequently, users may notice that the command output incorrectly labels the object as an "issue" (e.g., displaying "View this issue on GitHub" even when the URL points to a pull request) [4]. This behavior exists because the underlying logic does not always distinguish between the two object types when they are passed as arguments [4]. For the most accurate experience, it is generally recommended to use gh pr view for pull requests [5], though gh issue view remains technically capable of processing the URL [1][2].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="$(fd 'archon-create-plan.md' .archon/commands/defaults 2>/dev/null | head -n 1 || true)"
echo "== file: '${file:-MISSING}' =="

if [ -n "${file:-}" ]; then
  echo "== file length =="
  wc -l "$file"
  echo "== lines 1-120 =="
  nl -ba "$file" | sed -n '1,120p'
  echo "== exact references =="
  rg -n "0\.1a|gh issue view|gh pr view|comments|reviews|pull request|/\ /pull\/" "$file" || true
fi

echo "== gh experimental PR fields in local docs/source =="
GHDOCS="$(gh --help | sed -n '1,30p')"
echo "gh installed version available"

echo "== read-only docs check for github repo =="
gh issue view https://github.com/cli/cli/pull/5567 --json title,body,comments,url --jq '{title, issue_comments: (.comments | length)}' 2>/tmp/gh-issue-view-pull-err.txt || { echo "gh issue view exited:"; tail -n 20 /tmp/gh-issue-view-pull-err.txt; }
gh pr view https://github.com/cli/cli/pull/5567 --json title,body,comments,reviews,url --jq '{title, issue_comments: (.comments | length), reviews: (.reviews | length)}' || true

Repository: coleam00/Archon

Length of output: 344


🌐 Web query:

GitHub GraphQL PullRequest comments reviews fields nodes reviewStates

💡 Result:

In the GitHub GraphQL API, pull request reviews and their associated comments are handled through specific object types and connections [1][2]. PullRequest Object The PullRequest object provides a reviews connection to access reviews associated with the pull request [1][2]. Key fields and arguments for this connection include: - reviews (PullRequestReviewConnection): A list of reviews [1][2]. - Arguments: You can filter the reviews connection using states (to filter by specific PullRequestReviewState values), author, and pagination arguments (first, last, before, after) [1][2][3]. PullRequestReview Object Each review in the reviews connection is a PullRequestReview object, which includes: - state (PullRequestReviewState!): The current state of the review [4][5]. - comments (PullRequestReviewCommentConnection): A list of comments associated with that specific review [4][5]. - Other fields include body, author, createdAt, and submittedAt [4][5]. PullRequestReviewState Enum The state field uses the PullRequestReviewState enum, which contains the following possible values [6][7]: - PENDING: A review that has not yet been submitted [6][7]. - COMMENTED: An informational review [6][7]. - APPROVED: A review allowing the pull request to merge [6][7]. - CHANGES_REQUESTED: A review blocking the pull request from merging [6][7]. - DISMISSED: A review that has been dismissed [6][7]. Note: While PullRequest objects also have a top-level comments field (IssueCommentConnection), this relates to general issue/PR comments, not the line-specific comments found within PullRequestReview threads [1][8]. Review-related comments are typically accessed through the reviews connection or by querying PullRequestReviewThreads [1][4][9].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file=".archon/commands/defaults/archon-create-plan.md"

echo "== lines 1-120 =="
awk '{printf "%6d\t%s\n", NR, $0}' "$file" | sed -n '1,120p'

echo "== create-plan exact references =="
rg -n "0\.1a|gh issue view|gh pr view|comments|reviews|pull request|/\ pull\/" "$file" || true

echo "== gh PR URL fetch experiment =="
gh issue view https://github.com/cli/cli/pull/5567 --json title,body,comments,url --jq '{title, issue_comments: (.comments | length)}' 2>/tmp/gh-issue-view-pull-err.txt || {
  echo "--- gh issue view stderr ---"
  sed -n '1,80p' /tmp/gh-issue-view-pull-erf.txt
}

gh pr view https://github.com/cli/cli/pull/5567 --json title,body,comments,reviews,url --jq '{title, issue_comments: (.comments | length), review_count: (.reviews | length)}' || true

Repository: coleam00/Archon

Length of output: 6723


Route /pull/ inputs to a PR-specific fetch.

A GitHub PR URL at line 48 is passed to gh issue view, which only fetches comments and omits PR reviews. Use gh pr view for https://github.com/.../pull/{number}, or update this row to say review decisions are out of scope.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.archon/commands/defaults/archon-create-plan.md around lines 38 - 39, Update
the GitHub issue or PR URL handling in the plan so URLs containing
/pull/{number} use a PR-specific fetch via gh pr view, ensuring PR reviews are
included; retain gh issue view for issue URLs and bare issue-number inputs.

Source: MCP tools

Comment on lines 69 to +73
- **Follow linked issues.** When the body or a comment points at another issue
(`#1234` or a URL) for a decision or contract, fetch that issue and its
comments too. One level of following is enough.
- **If the body and a decision conflict, record which you followed** in the plan.
A silent choice is the failure mode here.
for a decision or contract, fetch it and its comments too. One level is enough.
A bare `#1234` means the current repo; a full URL may point at a **different**
repo — pass the URL to `gh issue view` verbatim so the owner/repo is preserved,
rather than extracting the number and reading the wrong repo's issue.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 4 \
  'extract-issue-number|fetch-issue|gh issue view|\$ARGUMENTS' \
  .archon/workflows/experimental/archon-fix-github-issue-experimental.yaml \
  .archon/commands/defaults/archon-create-plan.md

Repository: coleam00/Archon

Length of output: 11678


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow context around fetch-issue =="
sed -n '110,155p' .archon/workflows/experimental/archon-fix-github-issue-experimental.yaml

echo
echo "== command template around linked issues =="
sed -n '1,90p' .archon/commands/defaults/archon-create-plan.md

echo
echo "== references to command/issue extraction in repo =="
rg -n 'archon-create-plan|create-plan|Follow linked issues|extract-issue-number|fetch-issue|gh issue view' .archon -S

Repository: coleam00/Archon

Length of output: 16276


Preserve repository identity when fetching linked issues.

.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml extracts the bare issue number from extract-issue-number.output and runs gh issue view "$ISSUE_NUM", which resolves against the current repository. A full cross-repository URL in the linked issue can therefore fetch the wrong issue or fail. Pass the original issue URL through fetch-issue and add an end-to-end cross-repository test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.archon/commands/defaults/archon-create-plan.md around lines 69 - 73, Update
the linked-issue fetching flow in archon-fix-github-issue-experimental.yaml to
pass the original issue URL through fetch-issue instead of only the extracted
issue number, and invoke gh issue view with that URL unchanged so
cross-repository references preserve their repository identity. Add an
end-to-end test covering a linked issue from a different repository.

Comment on lines +93 to +108
- id: assert-deps-installed
bash: |
if [ -f "$ARTIFACTS_DIR/.prep-failed" ]; then
echo "prep-worktree reported a failed dependency install." >&2
echo "Refusing to implement against a broken dependency tree — later build," >&2
echo "type-check and test failures would be blamed on the implementation." >&2
exit 1
fi
# Independent of the model's own report: if a manifest exists, its install
# target must exist too. Catches the case where the model narrated success
# after a failure and never wrote the marker.
if [ -f package.json ] && [ ! -d node_modules ]; then
echo "package.json is present but node_modules is missing — dependencies did not install." >&2
exit 1
fi
echo '{"deps":"ok"}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg --files \
  -g 'package.json' -g 'package-lock.json' -g 'pnpm-lock.yaml' -g 'yarn.lock' \
  -g 'pyproject.toml' -g 'requirements*.txt' -g 'go.mod' \
  -g 'Cargo.toml' -g 'Gemfile.lock' \
  | sort

Repository: coleam00/Archon

Length of output: 512


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- workflow file ---\n'
cat -n '.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml' | sed -n '1,220p'

printf '\n--- occurrences of dependency-install/prep markers in experimental workflows ---\n'
rg -n 'deps-installed|prep-|node_modules|dependency|package.json|pnpm|npm|yarn|pip|pip3|uv|pyproject|requirements|go mod|cargo|gem|bundle' .archon/workflows/experimental -g '*.yaml' -g '*.yml' || true

printf '\n--- all manifests (non-workflow) ---\n'
git ls-files | rg -x 'package.json|package-lock.json|pnpm-lock.yaml|yarn.lock|pyproject.toml|requirements.*\.txt|go\.mod|Cargo\.toml|Gemfile\.lock|composer\.json$' | sort

Repository: coleam00/Archon

Length of output: 145


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- list workflow exists and size ---\n'
ls -lw '.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml' 2>/dev/null || true
wc -l '.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml' 2>/dev/null || true

printf '\n--- first 180 lines of workflow ---\n'
sed -n '1,180p' '.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml' 2>/dev/null | nl -ba

printf '\n--- targeted marker/manager references in workflows ---\n'
rg -n 'deps-installed|prep-failed|node_modules|dependency|package\.json|pnpm|npm|yarn|pip|pip3|uv|pyproject|requirements|go mod|cargo|gem|bundle' .archon/workflows/experimental -g '*.yaml' -g '*.yml' 2>/dev/null || true

Repository: coleam00/Archon

Length of output: 145


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- quick filesystem checks ---\n'
pwd
find .archon/workflows/experimental/archon-fix-github-issue-experimental.yaml -type f 2>/dev/null | sort
find .archon -maxdepth 3 -type f -name '*.yaml' 2>/dev/null | sort | sed -n '1,80p'

printf '\n--- workflow size ---\n'
wc -l '.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml' 2>/dev/null || true

printf '\n--- workflow relevant snippets ---\n'
python3 - <<'PY'
from pathlib import Path
p = Path('.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml')
if not p.exists():
    print('missing')
else:
    lines = p.read_text().splitlines()
    for start, end in [(1,130),(180,240),(240,320)]:
        print(f'\n### lines {start}-{end}')
        for i in range(start-1, min(end, len(lines))+1):
            print(f'{i+1:4d}: {lines[i]}')
PY

Repository: coleam00/Archon

Length of output: 244


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- workflow size ---'
wc -l .archon/workflows/experimental/archon-fix-github-issue-experimental.yaml 2>/dev/null || true

printf '%s\n' '--- workflow relevant snippets ---'
python3 - <<'PY'
from pathlib import Path
p = Path('.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml')
if not p.exists():
    print('missing')
else:
    lines = p.read_text().splitlines()
    for start, end in [(1,130),(80,120)]:
        print(f'\n### lines {start}-{end}')
        for i in range(start-1, min(end, len(lines))):
            print(f'{i+1:4d}: {lines[i]}')
PY

Repository: coleam00/Archon

Length of output: 9820


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import subprocess

# Read all workflows in .archon/workflows/experimental and print dependency markers/manager references.
for path in sorted(Path('.archon/workflows/experimental').glob('*.yaml')):
    print(f'\n### {path}')
    try:
        text = path.read_text()
    except Exception as e:
        print(f'ERROR: {e}')
        continue
    for i, line in enumerate(text.splitlines(), 1):
        if any(m in line for m in [
            'ARTIFACTS_DIR/.prep-failed', 'package.json', 'node_modules', 'preconstruct',
            'pnpm', 'npm', 'yarn', 'lockfile', 'dependency', 'dependencies', 'typecheck', 'validate'
        ]):
            print(f'{i:4d}: {line[:160]}')
PY

printf '%s\n' '--- repo manifest/lockfile files ---'
git ls-files | rg '(^|/)(package\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock|pyproject\.toml|requirements.*\.txt|go\.mod|Cargo\.toml|Gemfile\.lock)$' | sort

printf '%s\n' '--- package manager config files ---'
git ls-files | rg '(^|/)(\.prettierrc|\.npmrc|\.yarnrc|\.yarnrc\.yaml|\.pnpmfile\.js|package\.lock|preconstruct|turbo\.json|lerna\.json|nx\.json)$' | sort

printf '%s\n' '--- package manager package.json fields ---'
python3 - <<'PY'
import json
from pathlib import Path
for path in [Path('package.json')] + sorted(Path('packages').glob('package.json')):
    if not path.exists():
        continue
    data=json.loads(path.read_text())
    print(path)
    print(' packageManager:', data.get('packageManager'))
    print(' scripts:', data.get('scripts'))
    print(' preconstruct:', data.get('preconstruct'))
PY

Repository: coleam00/Archon

Length of output: 9899


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- root package manager and scripts ---'
python3 - <<'PY'
import json
data=json.loads(open('package.json', encoding='utf-8').read())
print('packageManager', data.get('packageManager'))
print('scripts')
for k,v in data.get('scripts',{}).items():
    if any(x in k.lower() or any(y in v.lower() for y in ['bun ','pnpm ','npm ','yarn ','node ']) for x in ['pre','build','type-check','check','test','validate','lint']):
        print(f'  {k}: {v}')
PY

printf '%s\n' '--- lockfiles and manager config ---'
git ls-files | rg '(^|/)(package-lock\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb?|\.npmrc|\.yarnrc|\.yarnrc\.yaml)$' | sort || true

printf '%s\n' '--- dependency marker references outside experimental workflows ---'
rg -n 'ARTIFACTS_DIR/.prep-failed|\.prep-failed|deps-installed|package.json|node_modules|preconstruct|packageManager|package-lock-only|pnpm install|npm ci|yarn install|bun install|install:' .archon -g '*.yaml' -g '*.yml' || true

printf '%s\n' '--- install script contents ---'
for f in scripts/*.sh scripts/*install* scripts/**/*install* 2>/dev/null; do
  if [ -f "$f" ]; then
    printf '\n### %s\n' "$f"
    sed -n '1,220p' "$f" | nl -ba
  fi
done

Repository: coleam00/Archon

Length of output: 8102


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- node_modules presence across manifests ---'
python3 - <<'PY'
from pathlib import Path
import json
for manifest_path in sorted(Path('.').glob('package.json')):
    data=json.loads(manifest_path.read_text(encoding='utf-8'))
    print(manifest_path, {
        'node_modules': manifest_path.parent.joinpath('node_modules').exists(),
        'scripts': list(data.get('scripts',{}).keys())
    })
PY

printf '%s\n' '--- lockfiles ---'
git ls-files | rg '(^|/)(bun\.lock$|bun\.lockb$|package-lock\.json|pnpm-lock\.yaml|yarn\.lock)$' | sort

printf '%s\n' '--- default workflows actual dependency install snippets ---'
rg -n 'bun install --frozen-lockfile|npm ci|yarn install --frozen-lockfile|pnpm install --frozen-lockfile' .archon/workflows/defaults -g '*.yaml' -g '*.yml' || true

Repository: coleam00/Archon

Length of output: 1669


Validate the actual dependency installation.

This gate only checks $ARTIFACTS_DIR/.prep-failed and root package.json without node_modules. This repo uses package.json plus bun.lock, and package.json does not define node_modules; missing worktree installs can therefore pass. Also handle nested package manifests that have no root dependency directory. Emit a checked install status for the selected manager and validate it before implement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml
around lines 93 - 108, Update the assert-deps-installed step to validate the
actual dependency installation using the selected package manager, including Bun
when package.json and bun.lock are present rather than assuming node_modules.
Detect dependency manifests in nested worktrees/packages, verify each applicable
install target or manager-specific status, emit a checked installation status,
and make implement depend on that validation.

…to issues

Two review findings, both correct.

The node_modules check would have exited 1 on every run in a Yarn PnP repo,
which resolves from .pnp.cjs and has no node_modules by design. In a bundled
default that blocks a legitimate project outright. Now skipped when PnP markers
are present, with the reasoning recorded so it is not "simplified" back.

The input table claimed to route PR URLs to the issue path, but 0.1a uses
`gh issue view`, which omits PR `reviews`. Rather than add PR handling to a
planning command, the row is scoped to issue URLs — honest about what it covers.
@Wirasm

Wirasm commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Disposition of the three findings, since two threads remain open:

1. Yarn PnP / dependency validation — fixed in `e0dbb9bc`, partially.

The blocking half was real and would have shipped a regression: my `[ -f package.json ] && [ ! -d node_modules ]` check exits 1 on every run in a Yarn PnP repo, which resolves from `.pnp.cjs` and has no `node_modules` by design. In a bundled default that blocks a legitimate project outright. Now gated on PnP markers with the reasoning recorded inline.

The stronger suggestion — have `prep-worktree` emit a checked install status for the selected manager and validate that — is better than what I shipped and I did not do it. What is here is a marker file plus one ecosystem-specific check. That is a real improvement over a purely advisory report but it is not a general solution, and I would rather say so than imply the finding is fully closed.

2. Cross-repo issue identity — filed as #2412, not fixed here.

Correct, and it is the workflow's own entry point rather than the linked-issue handling this PR touches: `extract-issue-number` is instructed to emit only a bare number, so `gh issue view "$ISSUE_NUM"` resolves against the current repo. An operator starting a run with `https://github.com/other/repo/issues/456\` silently gets this repo's #456. Pre-existing, so fixing it here would widen the PR past its subject.

3. PR URLs to `gh issue view` — fixed in `e0dbb9bc`. The table row claimed to route PR URLs to the issue path, but 0.1a omits PR `reviews`. Scoped the row to issue URLs rather than adding PR handling to a planning command.

@Wirasm
Wirasm merged commit f455e8e into dev Aug 3, 2026
4 checks passed
@Wirasm
Wirasm deleted the fix/2404-followups branch August 3, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant