Skip to content

ci: add trusted-main shadow observations without changing full CI - #48

Merged
brettheap merged 1 commit into
mainfrom
ci/shadow-event-classifier
Nov 12, 2026
Merged

brettheap merged 1 commit into
mainfrom
ci/shadow-event-classifier

Conversation

@brettheap

@brettheap brettheap commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Implement only the trusted shadow-classifier prerequisite approved by Brett, under feature009 / spec issue opensoft/openRepoTools-spec#26.

  • New ci-shadow.yml observer checks out trusted main and runs only main-owned policy with read-only contents/PR API access.
  • New bounded observer ports OpenBenches live identity, regular scoped diff, conservative fallback and stale already-merged metadata proof patterns. Initial scope is the modified claude-current/test pair; independent main-based PRs only.
  • Live main/PR/branch identities are checked and rechecked. Mixed/unsafe diffs, unsupported topology, read errors and stale/moving identities remain full.
  • Already-merged edited metadata requires same source head plus live merge, exact parents/ancestry and scoped landed content; it is not a tested-landing receipt.
  • Candidate-shaped events and main pushes explicitly report candidate-proof-required / landing-proof-required. No fake heavy/member/review evidence or bot/prefix exemption.
  • All observations remain mode=shadow, required_ci=full, skip_ci=false, queue_admission=false. No outputs or consumer can reduce existing checks.
  • Original pilot, tests.yml, reusable qualification, verify/release workflows, full-job baseline and Mergify configuration are untouched.

Verification

  • Red first: missing observer failed before implementation existed.
  • 76 new observer/contract vectors passed.
  • 495 focused tests passed with no skips (shadow, original pilot/queues, workflow contracts, coverage parity and shard accounting).
  • Offline disposable py-bench image limited to 2 CPUs / 2 GiB, real local Git fixtures, mocked read APIs, existing tests/run.sh and pinned dependency.
  • Actionlint, strict OpenSpec and git diff --check passed.
  • Hosted ordinary full CI and exact-head Codex review are separate pending publication evidence.

Trust bootstrap and limits

Main does not carry this policy before merge. The hosted observer MUST report policy-unavailable/full fallback, never execute head-owned code as a policy fallback. The separate source-contract job runs offline tests without passing the observer API token. A green bootstrap fallback is not live positive-scope or candidate acceptance.

Intent marker CI-Shadow: claude-current is observational only, not review/merge/admission authority. No queue/canary, merge, ruleset changes/bypass, app access, release changes/tags, assembly pins, installed tool/session replacement or lane1–5 edits are authorized by this PR.

Summary by Sourcery

Introduce trusted-main shadow observations for conservative CI classification while preserving all existing full-CI checks and authority boundaries.

New Features:

  • Add a trusted-main CI shadow observer that classifies narrowly scoped PR and source-push events without granting any CI, review, queue, or release authority.

Enhancements:

  • Add conservative live identity, ancestry, scoped-diff, read-failure, and already-merged metadata observations with explicit full fallbacks for unproven candidates and landings.
  • Document the observer trust boundary, bootstrap behavior, deferred qualification stages, and preservation of existing pilot and full-CI workflows.

CI:

  • Add a read-only GitHub Actions workflow that observes pull requests and pushes from a main checkout while keeping full CI mandatory and admission disabled.

Documentation:

  • Document the trusted shadow classifier and its integration boundaries in CI task-set and feature specification materials.

Tests:

  • Add comprehensive local Git fixture and mocked-API coverage for shadow classification, identity drift, unsafe diffs, candidate and landing events, workflow contracts, and bootstrap fallback behavior.

@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 days and 13 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Review the trusted-main classifier and its fixed scope, identity checks, conservative fallback, and read-only observation behavior.

  • .github/ci/shadow_scope.py L1-213

Configuration

Review the observer and offline contract workflow configuration, including trusted-main checkout, permissions, triggers, and bootstrap fallback.

  • .github/workflows/ci-shadow.yml L1-54

Documentation

Review the feature amendment recording the approved shadow-classifier scope, trust limits, and deferred qualification.

  • features/009-manual-two-pr-queue/openspec/shadow-classifier.md L1-26

Review the operational explanation of the classifier’s trust boundary, initial scope, and limitations.

  • .github/ci/shadow-classifier.md L1-69

Review the task-set guidance that clarifies the observer does not replace full-CI gates or grant admission.

  • .github/ci/task-set-delivery.md L3-7

Tests

Review the local Git and mocked-API contract vectors, including workflow and bootstrap checks for conservative, observational-only behavior.

  • tests/test_ci_shadow.py L1-475

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@brettheap

Copy link
Copy Markdown
Contributor Author

Governance companion: opensoft/openRepoTools-spec#29. Preparation only: all results require full CI, no skips or queue admission. No merge/canary/ruleset/app/release or lane changes.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T00:00:17.568213Z a52646f Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sonarqubecloud

Copy link
Copy Markdown

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a52646fa17

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@brettheap
brettheap merged commit 5fb492f into main Nov 12, 2026
26 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Merged normally as 5fb492f after exact-head full CI43123276586 (13/13 jobs, attempt1), shadow observation/contracts43123276531 plus push/metadata jobs, and clean Codex review on a52646f. Zero review threads. Verified live main before merge; landed tree2a8609ad418d527493277334fa4088e142d8af61 matches the tested merge and reviewed source tree exactly, with parents a16ac8f and a52646f. Spec29 merged ed85f6d; its tree also matches reviewed head. No canary/queue, ruleset/app/release changes, bypass or active-lane modifications. The observer remains shadow/full/no-skip/no-admission; bootstrap success was not live positive-scope qualification.

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