Skip to content

Allow cross-repository Java team-memory jobs on the bridge - #71

Merged
Changyong Gong (chagong) merged 1 commit into
mainfrom
chagong-allow-cross-repo-java-team-memory
Nov 26, 2026
Merged

Changyong Gong (chagong) merged 1 commit into
mainfrom
chagong-allow-cross-repo-java-team-memory

Conversation

@chagong

Copy link
Copy Markdown
Collaborator

Summary

Enable cross-repository team-memory reconciliation in automation_bridge/ so the enrolled Java tooling repositories (microsoft/vscode-java-debug, microsoft/java-debug, microsoft/vscode-java-test, microsoft/vscode-gradle, microsoft/build-server-for-gradle, microsoft/vscode-java-dependency, and microsoft/vscode-maven) can dispatch into microsoft/vscode-java-pack's shared wiki coordinator on protected main.

Changes

  • Pilot isolation preserved: microsoft/IssueLens (PILOT_REPOSITORY / pilot_repository_id) remains strictly same-repository and main-only, and external coordinators can never claim microsoft/IssueLens or pilot_repository_id as a team-memory source.
  • Cross-repository coordinator validation (automation_bridge/bridge.py, automation_bridge/function_app.py):
    • For an enrolled non-pilot coordinator running .github/workflows/team-memory-coordinator.yml on protected main, require coordinator_repository and required_wiki_repository to match the authenticated coordinator repository and keep the durable lock target repo-<coordinator_id>-wiki (for example repo-104967329-wiki) so same-repository and cross-repository wiki updates serialize under one reservation.
    • Allow metadata["repository"] / metadata["repository_id"] to identify either the coordinator itself or another non-pilot repository in ISSUELENS_BRIDGE_REPOSITORY_ALLOWLIST with a validated base_ref (such as main or develop), validating source merge identities and workflow_ref(action.DISPATCH_WORKFLOW, source_repository, base_ref) against the source repository.
    • Verify cross-repository source metadata at ingress via GitHub REST (/repos/{source_repository} and /repos/{source_repository}/branches/{quote(base_ref)}), requiring id == source_repository_id, matching full_name, private == False, visibility == "public", default_branch == base_ref, and protected == True (401 workflow_not_authorized when unauthorized/non-public/unprotected; 503 branch_protection_unavailable when GitHub checks are unavailable).
    • Update FoundryWorker.prepare() so team-memory jobs verify the durable job repository against coordinator_repository and required_wiki_repository while keeping issue-loop bound to metadata["repository"].
  • Allowlist example, tests, and docs:
    • Update automation_bridge/repository_allowlist.example.json with all 9 numeric repository IDs (1303440932, 104967329, 102584737, 102583752, 110522074, 216314492, 626812412, 129053101, 116921700).
    • Add unit tests in tests/test_automation_bridge.py covering cross-repository Java team-memory manual PR and push admission across main and develop, shared repo-104967329-wiki locking, pilot isolation, unallowlisted/private/unprotected/branch-mismatched rejections, 503 transport handling, URL-encoded branch checks, and FoundryWorker.prepare() validation.
    • Update docs/guide.md and .github/copilot-instructions.md.

Rollout

No Azure or Foundry deployment was performed. After review and merge, update ISSUELENS_BRIDGE_REPOSITORY_ALLOWLIST on ingress to include the enrolled Java repository IDs and deploy the bridge ZIP built from the merged revision (worker first, then ingress) before enabling the downstream caller workflows.

Validation

  • py -m compileall -q main.py media_inputs.py telemetry.py telemetry_export.py tests automation_bridge .github/actions github_app_mcp/src github_app_mcp/tests
  • py -m unittest discover -s tests -p "test_automation_bridge.py" (39 tests OK)
  • py -m unittest discover -s tests -p "test_team_memory*.py" (106 tests OK)
  • py -m unittest discover -s github_app_mcp/tests -p "test_*.py" (all OK)
  • git diff --check

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 4dc626cf5607541166ea585386cb53accb545423

Dimension Assessment Rationale
Change confidence 9/10 ↑ 158 focused root unit tests across bridge, coordinator, workflow, and prompt suites plus the standalone github_app_mcp suite pass, covering main and develop cross-repo Java team-memory admission, shared repo-104967329-wiki locking, ingress default-branch protection checks, pilot isolation, and worker job validation.
↓ GitHub Actions CI on the pull request and live Azure Function deployment/traffic remain pending operator rollout.

Allow enrolled non-pilot team-memory coordinators (such as
microsoft/vscode-java-pack on protected main) to submit manual PR and
reconciled push-range jobs for enrolled public cross-repository sources
on their verified protected default branch (including main and develop)
under the coordinator's shared wiki reservation, while keeping
microsoft/IssueLens strictly same-repository and main-only.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 04:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Expanding cross-repository wiki-write authorization requires human confirmation of enrollment and coordinated rollout, with live validation of OIDC admission, public branch-protection reads, and shared durable reservations beyond mocked tests.

No open issues 🎉

What changed in this PR

Extends IssueLens’s automation bridge so enrolled public Java tooling repositories can submit team-memory jobs through Java Pack’s shared wiki coordinator, while preserving IssueLens pilot isolation.

Changes:

  • Adds cross-repository source validation for enrollment, public visibility, default branch, and branch protection.
  • Keeps jobs and shared wiki reservations bound to the authenticated coordinator, including worker validation.
  • Expands admission and rejection test coverage, the example allowlist, and rollout documentation.
File Description
tests/​test_automation_bridge.py Adds coverage for cross-repository admission, isolation, branch checks, shared locking, and worker validation.
docs/​guide.md Documents enrollment rules, shared reservations, and rollout steps.
automation_bridge/​repository_allowlist.example.json Expands the example to include all nine repository IDs.
automation_bridge/​function_app.py Passes request metadata into ingress branch-protection validation.
automation_bridge/​bridge.py Validates cross-repository sources while preserving coordinator ownership and pilot isolation.
.github/​copilot-instructions.md Documents cross-repository boundaries and shared wiki coordination.

Review effort: Balanced

@chagong
Changyong Gong (chagong) merged commit 3ec342e into main Nov 26, 2026
8 checks passed
@chagong
Changyong Gong (chagong) deleted the chagong-allow-cross-repo-java-team-memory branch November 26, 2026 05:27
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.

2 participants