Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
13ba70d
fix: make hourly coordinator credential absence auditable
seonghobae Aug 20, 2026
42929f3
Merge remote-tracking branch 'origin/main' into fix/hourly-coordinato…
seonghobae Aug 20, 2026
f8e4e77
Merge remote-tracking branch 'origin/main' into HEAD
seonghobae Aug 20, 2026
dbc3eca
test: document coordinator credential scope
seonghobae Aug 20, 2026
0958a51
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 20, 2026
1ff3169
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 21, 2026
758b9c8
Merge branch 'main' of https://github.com/ContextualWisdomLab/.github…
seonghobae Aug 21, 2026
0dd3471
docs: complete coordinator client docstring
seonghobae Aug 21, 2026
cada3d5
Merge branch 'main' into fix/hourly-coordinator-credential-noop
seonghobae Aug 21, 2026
fb60217
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 21, 2026
272e176
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 21, 2026
0108708
test(coverage): document commercial readiness fixture initializer
seonghobae Aug 21, 2026
93eed1b
test: align scheduler contract and audit runtime
seonghobae Aug 21, 2026
b607047
Merge main into coordinator credential branch
seonghobae Aug 21, 2026
49bc5e4
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 21, 2026
9320b87
Merge remote-tracking branch 'origin/main' into fix/hourly-coordinato…
claude Aug 30, 2026
3f03a25
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 30, 2026
da8eb7e
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 30, 2026
78fc93e
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 30, 2026
8a24951
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 30, 2026
cfd2b58
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 30, 2026
7f931ec
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 30, 2026
379abfd
Merge branch 'main' into fix/hourly-coordinator-credential-noop
opencode-agent[bot] Aug 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions .github/workflows/organization-commercial-readiness-loop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,43 @@ jobs:
shell: bash --noprofile --norc -e -o pipefail {0}
run: |
if [ -z "${GH_TOKEN:-}" ]; then
echo "::error::PR_REVIEW_MERGE_TOKEN is required; neither the reviewer credential nor repository-scoped GITHUB_TOKEN is accepted."
exit 1
echo "::warning::PR_REVIEW_MERGE_TOKEN is not provisioned; recording a bounded no-op until the maintainer credential is configured."
python - "$RUNNER_TEMP/organization-commercial-readiness-loop.json" <<'PY'
from __future__ import annotations

import json
import os
import sys
from pathlib import Path

output_path = Path(sys.argv[1])
output_path.parent.resolve(strict=True)
if output_path.is_symlink():
raise RuntimeError("credential-unavailable receipt must not be a symlink")
Comment thread
seonghobae marked this conversation as resolved.
rendered = (
json.dumps(
{
"status": "skipped_credential_unavailable",
"reason": "PR_REVIEW_MERGE_TOKEN is not provisioned",
"next_action": "Provision PR_REVIEW_MERGE_TOKEN for the next hourly pass.",
},
indent=2,
)
+ "\n"
)
descriptor = os.open(
output_path,
os.O_WRONLY | os.O_CREAT | os.O_TRUNC | os.O_NOFOLLOW,
0o600,
)
with os.fdopen(descriptor, "w", encoding="utf-8") as handle:
handle.write(rendered)
PY
Comment thread
seonghobae marked this conversation as resolved.
Comment thread
seonghobae marked this conversation as resolved.
{
echo "## Hourly coordinator: credential unavailable"
echo "No cross-repository dispatch was attempted. Provision PR_REVIEW_MERGE_TOKEN, then the next hourly pass can resume bounded work."
} >>"$GITHUB_STEP_SUMMARY"
exit 0
fi
Comment thread
seonghobae marked this conversation as resolved.
echo "::add-mask::$GH_TOKEN"
test "$(git rev-parse HEAD)" = "${GITHUB_SHA}"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ Semantic Versioning where the repository publishes a release.

### Changed

- Record a bounded, auditable hourly no-op when the cross-repository maintainer credential is not provisioned, so missing configuration does not erase the receipt or fail the scheduler before the next-action guidance is visible.
- Emit completed repository pull-list requests as they finish in the five-minute
agent-mention sweep, while retaining the four-worker ceiling, rotation, and
exact-name dispatch ledger, so one slow repository cannot hide ready sibling
Expand Down
2 changes: 1 addition & 1 deletion docs/doctoring/organization-commercial-readiness-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The coordinator may dispatch at most one review-repair workflow and one product-

A single workflow cannot safely write every repository merely because it runs in the organization `.github` repository. GitHub's default `GITHUB_TOKEN` is scoped to the repository containing the workflow; cross-repository Actions dispatch therefore requires an explicitly provisioned user or GitHub App credential with the required repository and Actions permissions. This control does not make every repository directly writable. It only considers repositories the live API reports as organization-owned, non-fork, enabled, non-archived, default-branch-bearing, and writable by the authenticated installation.

The central job therefore refuses both repository-scoped and reviewer-scoped token fallbacks. It requires the maintainer-scoped `PR_REVIEW_MERGE_TOKEN`; `OPENCODE_APPROVE_TOKEN` remains isolated to the reviewer credential chain and `GITHUB_TOKEN` is not accepted for cross-repository coordination. The maintainer token is exposed only to the final dispatch shell step, not checkout, setup, artifact upload, or other third-party actions. The coordinator itself receives neither `NVIDIA_NIM_API_KEY` nor `COPILOT_GITHUB_TOKEN`. Model credentials remain inside separately reviewed repository-local or central workers.
The central job therefore refuses both repository-scoped and reviewer-scoped token fallbacks. When the maintainer-scoped `PR_REVIEW_MERGE_TOKEN` is absent, the scheduled pass records an explicit `skipped_credential_unavailable` receipt and exits without attempting a dispatch; the next action is to provision that secret. When present, it remains exposed only to the final dispatch shell step. `OPENCODE_APPROVE_TOKEN` remains isolated to the reviewer credential chain and `GITHUB_TOKEN` is not accepted for cross-repository coordination. The coordinator itself receives neither `NVIDIA_NIM_API_KEY` nor `COPILOT_GITHUB_TOKEN`. Model credentials remain inside separately reviewed repository-local or central workers.

## Dynamic repository-writer lease

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Verify that the hourly coordinator keeps cross-repository credentials scoped."""

from pathlib import Path


Expand All @@ -19,3 +21,13 @@ def test_maintainer_token_is_scoped_only_to_the_dispatch_step() -> None:
assert "PR_REVIEW_MERGE_TOKEN" not in before_dispatch
assert "GH_TOKEN:" not in before_dispatch
assert "env:\n GH_TOKEN: ${{ secrets.PR_REVIEW_MERGE_TOKEN }}" in dispatch_step


def test_missing_maintainer_token_is_an_auditable_noop() -> None:
"""Absent cross-repository authority must not create a failing empty receipt."""
source = WORKFLOW_PATH.read_text(encoding="utf-8")

assert '"status": "skipped_credential_unavailable"' in source
assert "organization-commercial-readiness-loop.json" in source
assert "Provision PR_REVIEW_MERGE_TOKEN" in source
assert "No cross-repository dispatch was attempted" in source
Loading