Repository navigation
✨ feature(integration): verify genuine required candidate contexts - #16035
Conversation
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
ca204bb
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
Verified source-only receipt: immutable HEAD Native policy old draft refusal No live dispatch, qualification, authority enrollment, permission/protection change, activation or deployment. Producer policy/execution remain OFF. Runtime revision, actual trusted schema-2 candidate production and protected-CAS qualification remain separately required before live use; no throughput claim. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Decision needed: @hanthor should decide whether the integration-candidate producer may hold id-token: write and publish a GitHub OIDC token as a workflow artifact (.github/integration-candidate.template.yml receipt job), and whether the 11-name required-context list in src/pkg/forgestate/integration_contexts.go is the intended protected set.
Routing to a human rather than judging alone: this PR edits three workflow files, adds a new token permission, and defines the protected-promotion gate's required-context cohort — trust surfaces — and it already carries a <!-- hive-sentinel --> notice. Author @clubanderson is an OWNERS approver.
What I verified in the tree (v5 cf008a5c) and the diff at ca204bbf:
v2-ci.yml/integration-technical-v2-ci.ymlchanges are limited to adding.github/integration-candidate.template.ymlto path filters, runningtest-generate-integration-ci.pyafter--check, and widening the node test glob tointegration-*.test.cjs. No permission or required-check changes there.- New permission: the generated
receiptjob in.github/integration-candidate.template.ymlgetscontents: read, actions: read, checks: read, id-token: write, mints an OIDC token with audiencehive-integration-producer-v1/<sha256 of payload>, and uploads it insideintegration-producer-receipt-<attempt>(30-day retention, 0600 file but artifact-readable by anyone withactions: read). The token iscore.setSecret-masked in logs. Verification uses the existing JWKS path insrc/pkg/github/integration_producer_token.go; the bespoke audience means the token is only meaningful to Hive's verifier. Open question for the approver: is publishing a GitHub-signed OIDC JWT as an artifact an acceptable attestation carrier here? - Binding checks:
bindCandidateContextReceipt(src/pkg/github/integration_candidate_governance.go) requires each of the 11 contexts to be a unique job/check pair with matching run ID, head SHA, suite ID, app ID (Actions,15368in the template), statuscompletedand equal conclusions;VerifyIntegrationCandidateGovernancere-fetches every member PR and recomputes the metadata digest over number/head/base/author/draft/title/body/labels/head-ref hashes, failing closed on drift. Schema-1 receipts short-circuit to nil for replay — intended per the body, but it means v1 receipts bypass the new context binding entirely. - Context names: all 11 names in
IntegrationRequiredContexts()map 1:1 toname:values of generated jobs inintegration-candidate.yml(REQUIRED_CONTEXT_JOBSat the receipt step).DCOhere is the Actions jobgovernance-dco, not the probot check of the same name — worth confirming that is what branch protection will be told to require.
Checks: native-queue-policy has one FAILURE and one CANCELLED run alongside a SUCCESS at this head; tide pending. I have no file:line defect to report; the question is one of policy, not correctness.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Trust-surface change — routing to the repository owner rather than judging it alone. I read the diff and the tree at What I verified:
One body/state mismatch, informational: the body says "Draft intentionally prevents premature source merge … Will mark ready only after technical CI is complete", but the PR is no longer a draft ( Nothing in the diff looked wrong to me. I have not approved, labelled, or changed anything. |
…ency pin hivecommons#16035 composed the gosec Scan job into integration-candidate.yml, so after rebasing onto it the generator --check (build-and-test, "Check readonly candidate CI generation") flagged the candidate as stale. Rerun generate-integration-ci.py so the composed Scan step carries -concurrency 4 too. Refs hivecommons#16040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
…16045) * 🐛 fix(ci): bound gosec concurrency so Scan stops losing its runner gosec v2.29.0 defaults -concurrency to runtime.NumCPU(). Inside a self-hosted runner pod that is the node's 32 vCPUs, not the pod's 6-CPU limit, and every worker type-checks and builds SSA for its own package. Thirty-two of those at once push the pod far past its 3Gi request on an overcommitted node, and it is killed mid-Scan: "The self-hosted runner lost communication with the server", logs BlobNotFound. Evidence: in the four failing jobs cited by the issue (124530335184, 124538397043, 124527124413, 124542607459) the job died in the Scan step every time, on four different runner pods, while the green runs finish Scan in about four minutes. Pin -concurrency 4 (at or below the runner CPU limit), regenerate the integration twin, and add a workflow contract asserting both gosec invocations pass an explicit -concurrency no higher than the runner container CPU limit in hive-runners-lke-values.yaml. Fixes #16040 Hive-Run: #16040 Hive-Plan: issue-16040 asks 1-2 (runner-side evidence, gosec resource profile) Hive-Spec: issue-16040#ask-2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HRH6kn7bGF1abH5x72U7zL Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com> * 🐛 fix(ci): regenerate integration-candidate.yml for the gosec concurrency pin #16035 composed the gosec Scan job into integration-candidate.yml, so after rebasing onto it the generator --check (build-and-test, "Check readonly candidate CI generation") flagged the candidate as stale. Rerun generate-integration-ci.py so the composed Scan step carries -concurrency 4 too. Refs #16040 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com> --------- Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Source-only required-context compatibility
Composes six real technical producers as top-level candidate jobs and adds five read-only governance verifiers for exact ordered members. Signed schema-2 receipts bind actual job/check/App/suite identities, latest attempt and current metadata. Missing, foreign-head, duplicate, skipped and drifted evidence fails closed. Historical receipts remain replayable; documented exact-prefix advancement does not spuriously invalidate metadata.
Uses explicitly pinned upstream pure verifier semantics rather than its advisory checks-writing image wrapper. No copied author-head statuses, impersonated App, bypass, deployment, live dispatch, permission/protection change or enrollment. Producer policy and execution remain OFF. Actual protected-promotion qualification is still mandatory; gate is not an ARM/image receipt.
Validation
CI is the sole verdict; no local repository suites run. Adds generator/DAG, immutable member/metadata, physical job/context, signed-receipt and archived false-green regressions. Draft intentionally prevents premature source merge while full exact-head CI runs. Will mark ready only after technical CI is complete and then verify the native policy replacement before guarded merge.