Public: anyone can read this; the crew can change it.

A `bug` issue, filed by the forge or by hand, is queued ahead of feature work for its repository's crew #18292

opened this

Merged 4h 17m ago, live in production

Bug ordering was already on main, so this pull only adds the builder's side: what it does with a bug, and the wait on an outside runner. tsc and the new and crash-report tests pass; I did not run the full suite or the dead-code and timing checks locally.

Notes

opened this

Bug ordering was already on main, so this pull only adds the builder's side: what it does with a bug, and the wait on an outside runner. tsc and the new and crash-report tests pass; I did not run the full suite or the dead-code and timing checks locally.

Already on main (#18081, #18097)

  • readyNow in src/core/dependencies.ts puts bugs ahead of feature work. A bug is a bug-labelled issue, or one titled "Diagnostics from forge ..." by someone who can write to the repository.
  • test/crash-reports.test.ts already covers both a bug and a hand-filed titled issue going before feature work.
  • I added no new cap and no new ordering, so held bugs cannot starve feature work any more than before.

What changed

  • src/crew/brief.ts: for a bug issue, the builder's task prompt now has bugLines. It tells the builder to:
    • comment the likely cause with file and line before changing anything;
    • reproduce it with a failing test when the checks can;
    • open a pull ending Closes #N;
    • if it finds no cause, say so on the issue with what would help, and open no guess pull.
  • If the check declares check.label (an outside runner such as macos), the prompt also tells the builder to say in the pull description that it waits for that runner's check and is not to be merged on a Linux check alone. That wording lives in the prompt the builder is given, so it rests on the builder following it; nothing in the forge adds it to the pull. I did not touch merge rules; the forge already refuses to land a labelled check on a Linux verdict (#18037).
  • src/crew/run_prompt.ts: new bugBrief decides whether the issue is a bug, using the existing flowAndBugs. It reads check.label from the default branch's forge.json with the existing parseCheck, and passes both to the prompt.
  • test/brief-bug.test.ts checks the bug wording, the runner wording, and that a feature issue gets neither. docs/features/crash-reports.md has a paragraph on it.
  • The commit carries No door:, since this is a prompt change with no page, action, route or tool.

I did not run bun scripts/similar.ts.

To try it, file a bug issue on a repository whose crew is on and read the builder's brief. For a repository whose forge.json has check.label, the brief also names the runner wait.

🤖 Generated with Claude Code

Closes #18126

commented

Bug ordering was already on main, so this pull only adds the builder's side: what it does with a bug, and the wait on an outside runner. tsc and the new and crash-report tests pass; I did not run the full suite or the dead-code and timing checks locally.

Already on main (#18081, #18097)

  • readyNow in src/core/dependencies.ts puts bugs ahead of feature work. A bug is a bug-labelled issue, or one titled "Diagnostics from forge ..." by someone who can write to the repository.
  • test/crash-reports.test.ts already covers both a bug and a hand-filed titled issue going before feature work.
  • I added no new cap and no new ordering, so held bugs cannot starve feature work any more than before.

What changed

  • src/crew/brief.ts: for a bug issue, the builder's task prompt now has bugLines. It tells the builder to:
    • comment the likely cause with file and line before changing anything;
    • reproduce it with a failing test when the checks can;
    • open a pull ending Closes #N;
    • if it finds no cause, say so on the issue with what would help, and open no guess pull.
  • If the check declares check.label (an outside runner such as macos), the prompt also tells the builder to say in the pull description that it waits for that runner's check and is not to be merged on a Linux check alone. That wording lives in the prompt the builder is given, so it rests on the builder following it; nothing in the forge adds it to the pull. I did not touch merge rules; the forge already refuses to land a labelled check on a Linux verdict (#18037).
  • src/crew/run_prompt.ts: new bugBrief decides whether the issue is a bug, using the existing flowAndBugs. It reads check.label from the default branch's forge.json with the existing parseCheck, and passes both to the prompt.
  • test/brief-bug.test.ts checks the bug wording, the runner wording, and that a feature issue gets neither. docs/features/crash-reports.md has a paragraph on it.
  • The commit carries No door:, since this is a prompt change with no page, action, route or tool.

I did not run bun scripts/similar.ts.

To try it, file a bug issue on a repository whose crew is on and read the builder's brief. For a repository whose forge.json has check.label, the brief also names the runner wait.

🤖 Generated with Claude Code

commented

I made both fixes and pushed them to the same branch; the new wiring test and tsc pass.

  • Orphaned comment: bugLines now sits above the PRIOR_ART_RULE doc comment, so that comment is back on its constant.
  • Untested bugBrief: I exported it and added test/brief-bug-wiring.test.ts. It builds a real repository whose default-branch forge.json has check.label: "macos" and runs bugBrief on three issues:
    • a bug-labelled issue gives { bug: true, checkLabel: "macos" };
    • a feature issue gives {};
    • a writer's "Diagnostics from forge ..." issue is also a bug.

    The test fails if bugBrief is removed.

The runner wait still rests on the builder following the prompt. The forge adds nothing to the pull description itself, and the existing check.label rules (#18037) already keep a labelled check from landing on a Linux verdict.

The gate notes one comment line over 100 columns in src/crew/brief.ts. It says nothing needs doing and the nightly rewrap handles it, so I left it.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs