Skip to content

feat(factory): link executor PRs to their source issue (0.9.2) - #85

Merged
stackbilt-admin merged 1 commit into
mainfrom
feat/pr-issue-link
Sep 24, 2026
Merged

stackbilt-admin merged 1 commit into
mainfrom
feat/pr-issue-link

Conversation

@stackbilt-admin

Copy link
Copy Markdown
Member

Problem: the executor's PRs carry their acceptance report in the body but close no issue. The agent-acceptance Action reads contracts only from issues a PR closes, and never from the PR body. So on a repo that uses the Action, an executor PR shows as "not machine-checked": seen live on stackbilt-admin/fork-canary#5, which passed 6/6 in the executor.

Change:

  • issueReference(target, issueRepo, issueNumber): an issue in the PR's target repo becomes Fixes #N; an issue elsewhere becomes Refs owner/name#N; a missing or malformed link produces nothing.
  • The executor fetches github_issue_repo and github_issue_number when it claims a task, and puts the reference as the PR body's first line.
  • aegis_create_cc_task accepts github_issue_repo and github_issue_number, which must be given together. The executor field it already had is unchanged.
  • The docs gain a "Linking a task to its issue" section on pairing the executor with the Action.

Verification:

  • Typecheck is clean. Tests: 1874 passed, 1 skipped, across 90 files.
  • The new tests cover issueReference (same repo, another repo, malformed links) and the create-tool issue-link validation.
  • Live proof comes after the reference deployment adopts 0.9.2: a canary task linked to an issue should produce a PR that the Action passes from the issue's contract.

🤖 Generated with Claude Code

Tasks carrying github_issue_repo/number get "Fixes #N" (same repo) or
"Refs owner/name#N" as the PR's first line, so GitHub closes the issue
and PR-side checks like the agent-acceptance Action find the contract
the maintainer wrote there. aegis_create_cc_task accepts the link.

Governed-By: docs/sandbox-executor.md
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@stackbilt-admin
stackbilt-admin merged commit 913ee11 into main Sep 24, 2026
2 checks passed
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