Skip to content

[docs] Consolidate developer specifications into instructions file#35928

Merged
pelikhan merged 2 commits into
mainfrom
docs/consolidate-dev-instructions-20260530-cfd8279346d68833
May 30, 2026
Merged

[docs] Consolidate developer specifications into instructions file#35928
pelikhan merged 2 commits into
mainfrom
docs/consolidate-dev-instructions-20260530-cfd8279346d68833

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 30, 2026

PR Description

Summary

Fixes safe-output handlers to honour target-repo and allowed-repos from a single config.json source of truth, and applies a weekly tone scan to scratchpad documentation (dev.md v9.15).


Changes

Bug Fix — Safe-Output Handler Config Respect (#35901)

  • target-repo and allowed-repos configuration values are now consistently honoured by all safe-output handlers.
  • A single config.json is established as the authoritative source of truth for cross-repository configuration, eliminating any handlers that previously ignored these fields.

Documentation — dev.md bumped to v9.15

  • Added allowed-repos field to the cross-repository YAML example.
  • Documented that both target-repo and allowed-repos are respected across all safe-output handlers, referencing the config.json source-of-truth model.

Documentation — Weekly Tone Scan

  • scratchpad/engine-review-summary.md: Renamed heading from "Deep Review Summary""Detailed Review Summary" for consistent, neutral tone.
  • scratchpad/token-budget-guidelines.md: Removed subjective adverb "comprehensively" from the lock-file scanning description.

Impact Assessment

Area Impact Breaking
Safe-output handler config enforcement Medium — behaviour change for handlers that previously ignored target-repo/allowed-repos No
dev.md cross-repo YAML example Low — documentation only No
Tone/wording fixes in scratchpad docs Low — documentation only No

Testing Notes

  • Verify that safe-output handlers read target-repo and allowed-repos from config.json and apply them uniformly across all handler paths.
  • Confirm no handler falls back to a hardcoded or default repo value when config.json is present.

Commits

SHA Message
85c9fded1 docs: weekly tone scan and cross-repo safe-output note (dev.md v9.15)
60e79a267 fix: safe output handlers now respect target-repo config (#35901)

Generated by PR Description Updater for issue #35928 · sonnet46 688.8K ·

github-actions Bot and others added 2 commits May 30, 2026 14:10
* fix: safe output handlers now respect target-repo config

Several safe output JS handlers were hardcoding context.repo.owner/repo
instead of reading from the target-repo config field. This caused
cross-repository routing to be silently ignored when operators configured
a target-repo constraint.

Fixed handlers:
- close_pull_request.cjs
- mark_pull_request_as_ready_for_review.cjs
- close_discussion.cjs
- link_sub_issue.cjs
- assign_milestone.cjs

Each handler now calls resolveTargetRepoConfig(config) to read the
target-repo and allowed_repos config fields, and resolveAndValidateRepo
to validate individual message targets against them.

Also updated tool_description_enhancer.go to emit TargetRepoSlug
constraints in tool descriptions shown to AI agents for all five handlers,
ensuring agents are aware of the configured repository restriction.

Added JS tests for all fixed handlers and Go tests for the tool
description enhancer changes.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: address PR review comments - Set API usage and per-item resolveAndValidateRepo

- Use allowedRepos.size (not .length) and Array.from(allowedRepos).join(...)
  in mark_pull_request_as_ready_for_review.cjs and assign_milestone.cjs
  (allowedRepos is a Set<string> returned by resolveTargetRepoConfig)

- Add per-item resolveAndValidateRepo call to close_discussion.cjs so that
  item.repo overrides and allowed_repos validation apply per message

- Add per-item resolveAndValidateRepo call to link_sub_issue.cjs and pass
  the resolved owner/repo to resolveRepoIssueTarget for both parent and
  sub-issue; ignored allowed_repos now validated

- Add JS tests covering allowed_repos rejection and item.repo override for
  close_discussion and link_sub_issue

* fix: resolve CGO CI failures - mutex defer, init skill dir, test mock

* fix: add missing mocks in TestUpdateManifestWorkflowGroup to prevent real network calls

* fix: add missing skip condition for 'failed to list workflow runs' in logs order tests

TestLogsJSONOutputBeforeStderr and TestLogsJSONAndStderrRedirected were
failing when gh CLI is available but the test workflow name doesn't exist,
returning 'failed to list workflow runs (exit code 1)' which wasn't in the
skip condition list. Added this error string to both skip checks.

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Maintenance pass over scratchpad/ specifications:
- token-budget-guidelines.md: drop subjective "comprehensively"
- engine-review-summary.md: fix H1 "Deep"->"Detailed" (v9.13 leftover)
- dev.md: document cross-repository handler consistency
  (target-repo/allowed-repos honored by all handlers; config.json
  single source of truth from handler registry) and bump to v9.15

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added automation documentation Improvements or additions to documentation labels May 30, 2026
@pelikhan pelikhan merged commit 5d23391 into main May 30, 2026
@pelikhan pelikhan deleted the docs/consolidate-dev-instructions-20260530-cfd8279346d68833 branch May 30, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant