diff --git a/docs/bugbot/failure-scenarios.mdx b/docs/bugbot/failure-scenarios.mdx index cbe25394f..34890eb8c 100644 --- a/docs/bugbot/failure-scenarios.mdx +++ b/docs/bugbot/failure-scenarios.mdx @@ -193,3 +193,20 @@ confirmation. Correct the named provider/response cause and recheck from the current source; preserve identity and reconciliation checks. Completed writes remain in place and must not be repeated blindly. See the [structured error reference](/security-operations/operations/error-reference#conflict-eligibility-and-review-freshness). + + +### Review the default writer installation separately + +The #977 artifact records an authenticated default-branch baseline, exact source +Action/bundle/workflow hashes and a proposed workflow that invokes the reviewed +Action SHA. Copying a workflow with a local `./` action onto an older default can +execute older code. Review that source pin together with its destination SHA; +stop and prepare a new review if either changes. Keep the source runner route, +serialization, private read permissions and native source checks intact. + +A prepared artifact, an exact-byte fixture or a develop merge does not prove +installed readiness. Use the supported setup inspection/review/receipt route +coordinated with #814, with specific authorization, maintainer default merge and +a real canary only on an explicitly authorized test PR. Record the actual installed +SHA, run and comment result. No native canary or installation has occurred in +this proposal; production verification remains disabled. diff --git a/package.json b/package.json index 4c7247b20..b3c876e82 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest --coverage --json --outputFile=coverage/setup-acceptance-jest.json && node scripts/validate-coverage-budgets.cjs && node scripts/validate-setup-assistant-acceptance.cjs coverage/setup-acceptance-jest.json && pnpm run test:extension", - "test:bugbot-shadow-verification": "node --test quality/bugbot/evidence/issue-950/shadow-verification/verification.test.cjs quality/bugbot/evidence/issue-950/normal-flow-shadow/config.test.cjs quality/bugbot/evidence/issue-950/normal-flow-shadow/paths.test.cjs quality/bugbot/evidence/issue-950/ev07-shadow/launch-full-review.test.cjs quality/bugbot/evidence/issue-950/ev07-shadow/review-runtime.test.cjs quality/bugbot/evidence/issue-950/ev07-shadow/score-review.test.cjs quality/bugbot/evidence/issue-950/ev07-shadow/plan.test.cjs quality/bugbot/evidence/issue-950/status-card-publication/publisher.test.cjs", + "test:bugbot-shadow-verification": "node --test quality/bugbot/evidence/issue-977/installation-state.test.cjs quality/bugbot/evidence/issue-950/shadow-verification/verification.test.cjs quality/bugbot/evidence/issue-950/normal-flow-shadow/config.test.cjs quality/bugbot/evidence/issue-950/normal-flow-shadow/paths.test.cjs quality/bugbot/evidence/issue-950/ev07-shadow/launch-full-review.test.cjs quality/bugbot/evidence/issue-950/ev07-shadow/review-runtime.test.cjs quality/bugbot/evidence/issue-950/ev07-shadow/score-review.test.cjs quality/bugbot/evidence/issue-950/ev07-shadow/plan.test.cjs quality/bugbot/evidence/issue-950/status-card-publication/publisher.test.cjs", "eval:bugbot": "jest src/tooling/__tests__/bugbot_quality_eval.test.ts src/tooling/__tests__/bugbot_benchmark.test.ts src/tooling/__tests__/bugbot_request_transform_evidence.test.ts --runInBand", "typecheck": "tsc --noEmit && pnpm run typecheck:extension", "metrics:architecture": "node scripts/collect-architecture-metrics.cjs", diff --git a/quality/bugbot/evidence/issue-977/README.md b/quality/bugbot/evidence/issue-977/README.md new file mode 100644 index 000000000..5c1b9430f --- /dev/null +++ b/quality/bugbot/evidence/issue-977/README.md @@ -0,0 +1,86 @@ +# Reviewed installation proposal — #977 + +**Prepared only; not installed, authorized or natively verified.** The authenticated +destination is vypdev/copilot (891781467), master at +ace49e4a7ce0f6a007fef5d11479eb9b7a5846e3. A readable workflow-directory listing +at that exact SHA proves the writer filename absent (`observed-default.json`). +A 404 alone is not absence proof. No default file, Variable, Secret, protection, +runner policy, release, consumer template or production mode was changed. + +## Exact proposed artifact + +`proposed-workflow.yml` is the #976 source workflow with exactly one substitution: +`uses: ./` becomes `uses: vypdev/copilot@1b024481d9d86cb4d4b10eb7f8569f9c8e2f0981`. +Copying the local-action workflow onto the older default revision would load the +older executable. The explicit reviewed SHA avoids that dependency. Preserve the +existing self-hosted/codex/Linux route, default-ref admission, per repository/PR +serialized queue, operation correlation, native evidence revalidation, private-PR +read permissions, publication PAT and last verified comment behavior. No new +credential scope is requested. + +`manifest.json` binds the destination, before-state, exact Action manifest/bundle, +source workflow and proposed workflow hashes. Its SHA-256 is +3738d8b9c823739c745ad30e4bf438afdd7d8d3361f2abcd6e71430d0dad13b8. #976 / PR #989 is still unmerged; maintainer review/approval +of this source revision is pending. This is not a producer code attestation. +Do not install a different source or update a moved default from this receipt. + +Coordinate the installation with #814's shared inspection/review/diff/receipt and +drift fences. This proposal does not implement a parallel updater, provision +resources or create a setup branch. The maintainer must authorize the exact +manifest/source/target and use the existing supported reviewed installation PR +route. If that route cannot preserve this exact reviewed pin, stop for its +supported migration rather than substituting a floating tag or a blanket update. +A future installation needs its own prepared-commit receipt and fresh authenticated +destination read; a develop merge or this artifact alone cannot close #977. + +## Executed controls + +Nine deterministic artifact controls pass: authenticated absence, exact installed +bytes, foreign workflow, foreign repository, moved default SHA, renamed default, +inaccessible parent, contradictory listing and the real YAML's source pin / +admission / runner / queue / credentials. `exact-installed-bytes` is only a +synthetic byte comparison, not evidence that a workflow is enabled or installed. +The first test attempt failed before running because it used an uninstalled YAML +package; it now uses the project's existing js-yaml dependency. Both logs remain. + +The exact #976 Action bundle (SHA in manifest) also passes **14 packaged localhost +scenarios**, recorded in `packaged-results.json` and the per-scenario byte-exact +compressed logs. They cover progress update, duplicate no-write, independent +refresh, terminal update, delayed progress, replaced attempt, replacement retry, +push during preflight, denied private PR read, refused comment write, verified +empty conversation, missing conversation and legacy card progress/upgrade. +The copied historical canary was adapted only for the new operation correlation, +fixed source-bundle digest, new-empty-output requirement and denied private read; +the original #950 driver/history are unchanged. Fake comment PATCH/POST attempts, +including a refused write and an explicitly rejected GraphQL mutation audit, +are recorded as fake. Real GitHub writes and model calls are zero. + +| Required distinction | Actual evidence | +| --- | --- | +| Absent | Authenticated exact-default parent listing and classifier control | +| Exact installed | Synthetic exact-byte classifier; actual installation pending | +| Incompatible/foreign | Foreign source pin and repository controls | +| Stale source | Moved default / renamed default controls; packaged push-preflight | +| Denied private read | Actual packaged worker gets local fake 403, nonzero exit, zero writes, prior card retained | +| Duplicate/replaced wakeup | Actual packaged identical-progress no write; prior attempt refused; new attempt updates | + +Run the classifier with `node --test quality/bugbot/evidence/issue-977/installation-state.test.cjs`. +For the packaged audit, create a new empty directory and run +`node quality/bugbot/evidence/issue-977/packaged-canary.cjs /absolute/reviewed/build/github_action/index.js /absolute/new-empty-directory`. +The bundle digest must match the manifest before any case; never point it at an +unreviewed runtime and reinterpret its output as native installation evidence. + +## Remaining acceptance + +1. Maintainer review and integration of #976 at the exact approved revision. +2. Specific installation authorization for the exact manifest and fresh default. +3. Reviewed installation PR/default merge by the maintainer/Action, with its actual + prepared commit, matching receipt and resulting destination SHA. +4. An explicitly authorized test PR, then a genuinely run native dispatch/canary, + recorded run/job/result and current-source comment readback. No PR has been + chosen or mutated automatically; no native canary is claimed. +5. Read back the installed exact workflow/code and inspect native readiness. + +Production verification remains disabled. EV-07 and qualification remain separate. + +All 149 shadow controls pass, including the nine artifact cases; specification/catalog/documentation validators and Graphify pass. These local results do not change the pending installation/native acceptance. diff --git a/quality/bugbot/evidence/issue-977/all-shadow-controls.log.gz b/quality/bugbot/evidence/issue-977/all-shadow-controls.log.gz new file mode 100644 index 000000000..6b02ee433 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/all-shadow-controls.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/comment-write-refusal.log.gz b/quality/bugbot/evidence/issue-977/comment-write-refusal.log.gz new file mode 100644 index 000000000..5d453b155 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/comment-write-refusal.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/delayed-progress-after-terminal.log.gz b/quality/bugbot/evidence/issue-977/delayed-progress-after-terminal.log.gz new file mode 100644 index 000000000..6678d1e15 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/delayed-progress-after-terminal.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/denied-private-pr-read.log.gz b/quality/bugbot/evidence/issue-977/denied-private-pr-read.log.gz new file mode 100644 index 000000000..b9b7cd759 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/denied-private-pr-read.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/identical-progress.log.gz b/quality/bugbot/evidence/issue-977/identical-progress.log.gz new file mode 100644 index 000000000..6678d1e15 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/identical-progress.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/independent-recheck.log.gz b/quality/bugbot/evidence/issue-977/independent-recheck.log.gz new file mode 100644 index 000000000..8cd77ebeb Binary files /dev/null and b/quality/bugbot/evidence/issue-977/independent-recheck.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/installation-controls-attempt-1.log.gz b/quality/bugbot/evidence/issue-977/installation-controls-attempt-1.log.gz new file mode 100644 index 000000000..4ebbe9f24 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/installation-controls-attempt-1.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/installation-controls-attempt-2.log.gz b/quality/bugbot/evidence/issue-977/installation-controls-attempt-2.log.gz new file mode 100644 index 000000000..841a70b7b Binary files /dev/null and b/quality/bugbot/evidence/issue-977/installation-controls-attempt-2.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/installation-state.cjs b/quality/bugbot/evidence/issue-977/installation-state.cjs new file mode 100644 index 000000000..484ff6470 --- /dev/null +++ b/quality/bugbot/evidence/issue-977/installation-state.cjs @@ -0,0 +1,20 @@ +'use strict'; + +// Read-only evidence classification for the reviewed installation proposal. +// It neither changes a target nor authorizes the existing setup installer. +const { createHash } = require('node:crypto'); +const hash = value => createHash('sha256').update(value).digest('hex'); + +function installationState(plan, observed) { + if (observed.repositoryId !== plan.destination.repositoryId + || observed.repository !== plan.destination.repository) return 'incompatible'; + if (observed.defaultBranch !== plan.destination.defaultBranch + || observed.head !== plan.destination.head) return 'stale-source'; + if (typeof observed.workflow === 'string') return hash(observed.workflow) === plan.proposedWorkflowSha256 + ? 'exact-installed-bytes' : 'incompatible'; + return observed.workflowParentReadable === true && Array.isArray(observed.workflowNames) + && observed.workflowNames.length < 1000 && observed.workflowNames.every(name => typeof name === 'string') + && !observed.workflowNames.includes(plan.path.split('/').at(-1)) ? 'absent' : 'unknown'; +} + +module.exports = { installationState }; diff --git a/quality/bugbot/evidence/issue-977/installation-state.test.cjs b/quality/bugbot/evidence/issue-977/installation-state.test.cjs new file mode 100644 index 000000000..98f44f0bf --- /dev/null +++ b/quality/bugbot/evidence/issue-977/installation-state.test.cjs @@ -0,0 +1,48 @@ +'use strict'; + +const assert = require('node:assert/strict'); +const { readFileSync } = require('node:fs'); +const { createHash } = require('node:crypto'); +const path = require('node:path'); +const { test } = require('node:test'); +const { load: parse } = require('js-yaml'); +const { installationState } = require('./installation-state.cjs'); +const plan = require('./manifest.json'); +const baseline = require('./observed-default.json'); +const workflow = readFileSync(path.join(__dirname, 'proposed-workflow.yml'), 'utf8'); + +for (const [name, observed, expected] of [ + ['authenticated absent', baseline, 'absent'], + ['exact installed bytes', { ...baseline, workflow }, 'exact-installed-bytes'], + ['foreign workflow', { ...baseline, workflow: workflow.replace(plan.source.commit, 'f'.repeat(40)) }, 'incompatible'], + ['foreign repository', { ...baseline, repositoryId: 1 }, 'incompatible'], + ['moved default head', { ...baseline, head: 'a'.repeat(40) }, 'stale-source'], + ['renamed default', { ...baseline, defaultBranch: 'other' }, 'stale-source'], + ['inaccessible parent', { ...baseline, workflowParentReadable: false }, 'unknown'], + ['contradictory listing', { ...baseline, workflowNames: ['copilot_bugbot_status_card.yml'] }, 'unknown'], +]) test('installation classification distinguishes ' + name, () => { + assert.equal(installationState(plan, observed), expected); + assert.equal(plan.installationAuthorized, false); + assert.equal(plan.installedDestinationSha, null); + assert.equal(plan.nativeCanary.status, 'not-run'); +}); + +test('the minimal proposed workflow pins reviewed code and preserves serialization, admission and narrow credentials', () => { + assert.equal(createHash('sha256').update(workflow).digest('hex'), plan.proposedWorkflowSha256); + const yaml = parse(workflow), job = yaml.jobs.publish; + assert.deepEqual(Object.keys(yaml.on), ['workflow_dispatch']); + assert.deepEqual(Object.keys(yaml.on.workflow_dispatch.inputs).sort(), ['operation', 'pull_number', 'work']); + assert.equal(job.if, "${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}"); + assert.deepEqual(job['runs-on'], ['self-hosted', 'codex', 'Linux']); + assert.equal(job.concurrency.group, 'copilot-bugbot-status-${{ github.repository_id }}-${{ inputs.pull_number }}'); + assert.equal(job.concurrency.queue, 'max'); + assert.equal(job.concurrency['cancel-in-progress'], false); + assert.deepEqual(job.permissions, { actions: 'read', checks: 'read', contents: 'read', issues: 'read', 'pull-requests': 'read' }); + const step = job.steps.find(step => step.name === 'Publish canonical comment'); + assert.equal(step.uses, 'vypdev/copilot@' + plan.source.commit); + assert.equal(step.with.token, '${{ secrets.PAT }}'); + assert.equal(step.env.COPILOT_EVIDENCE_TOKEN, '${{ github.token }}'); + assert.equal(step.env.COPILOT_BUGBOT_STATUS_CARD_WORKFLOW, 'write-v1'); + assert.equal(plan.productionVerification, 'disabled'); + assert.equal(plan.consumerTemplatesChanged, false); +}); diff --git a/quality/bugbot/evidence/issue-977/legacy-card-progress.log.gz b/quality/bugbot/evidence/issue-977/legacy-card-progress.log.gz new file mode 100644 index 000000000..8cd77ebeb Binary files /dev/null and b/quality/bugbot/evidence/issue-977/legacy-card-progress.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/legacy-card-upgrade.log.gz b/quality/bugbot/evidence/issue-977/legacy-card-upgrade.log.gz new file mode 100644 index 000000000..8cd77ebeb Binary files /dev/null and b/quality/bugbot/evidence/issue-977/legacy-card-upgrade.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/manifest.json b/quality/bugbot/evidence/issue-977/manifest.json new file mode 100644 index 000000000..67044d6ca --- /dev/null +++ b/quality/bugbot/evidence/issue-977/manifest.json @@ -0,0 +1,35 @@ +{ + "schemaVersion": 1, + "kind": "review-only-publisher-installation-proposal", + "destination": { + "repository": "vypdev/copilot", + "repositoryId": 891781467, + "defaultBranch": "master", + "head": "ace49e4a7ce0f6a007fef5d11479eb9b7a5846e3" + }, + "path": ".github/workflows/copilot_bugbot_status_card.yml", + "baseline": "absent with authenticated readable parent", + "source": { + "repository": "vypdev/copilot", + "commit": "1b024481d9d86cb4d4b10eb7f8569f9c8e2f0981", + "pullRequest": 989, + "merged": false, + "maintainerApproval": "pending", + "workflowSha256": "7a6b58ec81c41b49e8b4eed59b285f83da71251174fef2ee069138860fcc5b81", + "actionManifestSha256": "0875913058675d1a0e68117a8c98bb7508cf548f5775b645c5352bbd3bce127f", + "actionBundleSha256": "8bd2355979f551142848a0c9fdc3f5f8690fecb8a12da4910a0aad65e155e930" + }, + "proposedWorkflowSha256": "6329588dc571722aba3c97ce3be8d1f5e84bff2fbf7ecb4da39ad4f36c66da90", + "sourceChange": "replace local ./ invocation with exact reviewed Action SHA; preserve all other workflow bytes", + "consumerTemplatesChanged": false, + "productionVerification": "disabled", + "installationAuthorized": false, + "installedDestinationSha": null, + "nativeCanary": { + "status": "not-run", + "explicitlyAuthorizedPullRequest": null, + "runId": null + }, + "dependency": 976, + "coordination": 814 +} diff --git a/quality/bugbot/evidence/issue-977/missing-conversation.log.gz b/quality/bugbot/evidence/issue-977/missing-conversation.log.gz new file mode 100644 index 000000000..2def114b7 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/missing-conversation.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/new-progress.log.gz b/quality/bugbot/evidence/issue-977/new-progress.log.gz new file mode 100644 index 000000000..8cd77ebeb Binary files /dev/null and b/quality/bugbot/evidence/issue-977/new-progress.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/observed-default.json b/quality/bugbot/evidence/issue-977/observed-default.json new file mode 100644 index 000000000..31b628186 --- /dev/null +++ b/quality/bugbot/evidence/issue-977/observed-default.json @@ -0,0 +1,32 @@ +{ + "repository": "vypdev/copilot", + "repositoryId": 891781467, + "defaultBranch": "master", + "head": "ace49e4a7ce0f6a007fef5d11479eb9b7a5846e3", + "observedAt": "2026-11-19T20:33:51.219529+00:00", + "workflowParentReadable": true, + "workflowNames": [ + "agent-cli-provisioning.yml", + "ci_check.yml", + "copilot_branch_sync.yml", + "copilot_close_inactive_issues.yml", + "copilot_comment_runtime.yml", + "copilot_commit.yml", + "copilot_credential_health.yml", + "copilot_deployment_orchestration.yml", + "copilot_issue.yml", + "copilot_issue_comment.yml", + "copilot_pull_request.yml", + "copilot_pull_request_approval.yml", + "copilot_pull_request_comment.yml", + "copilot_pull_request_merge_queue.yml", + "copilot_pull_request_review_state.yml", + "copilot_runner_diagnostics.yml", + "hotfix_workflow.yml", + "release_workflow.yml", + "repowise.yml", + "setup_platform_smoke.yml" + ], + "workflowAbsent": true, + "evidence": "authenticated GitHub contents listing at exact default SHA; no installation mutation" +} diff --git a/quality/bugbot/evidence/issue-977/packaged-attempt-1.log.gz b/quality/bugbot/evidence/issue-977/packaged-attempt-1.log.gz new file mode 100644 index 000000000..86e43ea32 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/packaged-attempt-1.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/packaged-canary.cjs b/quality/bugbot/evidence/issue-977/packaged-canary.cjs new file mode 100644 index 000000000..fb97186fa --- /dev/null +++ b/quality/bugbot/evidence/issue-977/packaged-canary.cjs @@ -0,0 +1,223 @@ +'use strict'; +const assert = require('node:assert/strict'); +const { createHash } = require('node:crypto'); +const { createServer } = require('node:http'); +const { spawn } = require('node:child_process'); +const { readFileSync, writeFileSync, readdirSync } = require('node:fs'); +const { join, resolve } = require('node:path'); + +if (process.argv.length !== 4) throw new Error('Expected a packaged GitHub Action and an existing output directory.'); +const bundle = resolve(process.argv[2]); +const output = resolve(process.argv[3]); +assert.equal(readdirSync(output).length, 0, 'new empty output directory required'); +const manifest = require('./manifest.json'); +assert.equal(createHash('sha256').update(readFileSync(bundle)).digest('hex'), manifest.source.actionBundleSha256, 'reviewed source bundle differs'); +const project = '/repos/owner/project'; +const site = 'https://github.com/owner/project'; +const reviewPath = '.github/workflows/copilot_pull_request.yml'; +const cardPath = '.github/workflows/copilot_bugbot_status_card.yml'; +const source = { repositoryId: 19, pullNumber: 11, base: 'a'.repeat(40), baseRef: 'b'.repeat(40), + head: 'c'.repeat(40), policy: 'default' }; +const revision = sha => [ + '', + '', + '## Bugbot status', '', 'Verified source from controlled fixture.', +].join('\n'); +const previous = revision('d'.repeat(40)); +const current = revision(source.head); +const result = { realGitHubWriteAttempts: 0, modelCalls: 0, installed: false, nativeCanary: false, sourceCommit: manifest.source.commit, packageSha256: createHash('sha256').update(readFileSync(bundle)).digest('hex'), + evidence: 'packaged action with synthetic actions and comments on a loopback-only GitHub API', outcomes: [] }; +const canonical = { databaseId: 55, author: { login: 'fixture-bot', __typename: 'User' }, body: previous }; +let state; + +function makeState(overrides = {}) { + const pull = { number: 11, base: { sha: source.base, repo: { id: 19 } }, head: { sha: source.head, repo: { id: 19 } } }; + const run = { id: 23, run_attempt: 1, path: reviewPath, event: 'pull_request', status: 'in_progress', + created_at: '2026-11-18T06:00:00Z', repository: { id: 19 }, head_repository: { id: 19 }, pull_requests: [pull] }; + return { comment: { ...canonical }, sourceHead: source.head, run, sequence: 4, partitions: 18, operations: [], ...overrides }; +} + +function check(s) { + const externalId = ['bugbot', 11, source.base, source.head, 'default', 23, s.run.run_attempt].join(':'); + const observation = { stage: 'analyzing', headSha: source.head, baseSha: source.base, baseRefSha: source.baseRef, + pullNumber: 11, elapsedMs: 240000, observedAt: '2026-11-18T06:04:00.000Z', sequence: s.sequence, + partitions: { completed: s.partitions, total: 50 } }; + const marker = Buffer.from(JSON.stringify({ externalId, observation })).toString('base64url'); + return { total_count: 1, check_runs: [{ id: 38, name: 'Copilot / Review', head_sha: source.head, + external_id: externalId, details_url: site + '/runs/38', status: 'in_progress', app: { slug: 'github-actions' }, + output: { summary: '' } }] }; +} + +const server = createServer(async (request, response) => { + const path = decodeURIComponent(new URL(request.url, 'http://localhost').pathname); + const method = request.method; + let graphql; + if (method === 'POST' && path === '/graphql') { + const chunks = []; + for await (const chunk of request) chunks.push(chunk); + try { graphql = JSON.parse(Buffer.concat(chunks)); } catch { /* Invalid operations are denied and counted. */ } + } + const graphqlRead = typeof graphql?.query === 'string' && graphql.query.trim().startsWith('query ') + && !/\bmutation\b/u.test(graphql.query); + const write = !['GET', 'HEAD'].includes(method ?? '') && !graphqlRead; + const credential = request.headers.authorization?.split(' ')[1]; + state.operations.push({ method, path, write }); + response.setHeader('content-type', 'application/json'); + const reply = (data, status = 200) => { response.statusCode = status; response.end(JSON.stringify(data)); }; + if (path === '/user' && credential === 'fixture-writer') return reply({ login: 'fixture-bot' }); + if (method === 'GET' && credential !== 'fixture-reader') return reply({ message: 'Unsupported fixture credential' }, 403); + if (path === project) return reply({ id: 19, default_branch: 'master' }); + if (path === project + '/pulls/11') { + if (state.denyPrivateRead) return reply({ message: 'Fixture private PR read denied' }, 403); + const repo = { id: 19, owner: { login: 'owner' }, name: 'project' }; + const head = state.pushAfterConversation && state.conversationReads ? 'e'.repeat(40) : state.sourceHead; + return reply({ number: 11, state: 'open', draft: false, changed_files: 1, + head: { sha: head, ref: 'feature/reviewed', repo }, base: { sha: source.base, ref: 'develop', repo } }); + } + if (path === project + '/git/ref/heads/develop') return reply({ + ref: 'refs/heads/develop', object: { type: 'commit', sha: source.baseRef } }); + if (path === project + '/actions/runs/23') return reply(state.run); + if (path === project + '/actions/runs/24') return reply({ ...state.run, id: 24, run_attempt: 1, + event: 'issue_comment', path: '.github/workflows/copilot_issue_comment.yml' }); + if (path === project + '/actions/workflows/copilot_pull_request.yml/runs') { + return reply({ total_count: 1, workflow_runs: [state.run] }); + } + if (path === project + '/commits/' + source.head + '/check-runs') return reply(check(state)); + if (method === 'POST' && path === '/graphql') { + if (credential !== 'fixture-writer') return reply({ message: 'Unsupported fixture credential' }, 403); + const body = graphql; + if (!graphqlRead || body.variables?.issueNumber !== 11) return reply({ errors: [{ message: 'Unrecognized fixture query' }] }, 400); + state.conversationReads = (state.conversationReads ?? 0) + 1; + return reply({ data: { repository: { issueOrPullRequest: state.missingConversation ? null : { + comments: { nodes: state.comment ? [state.comment] : [], pageInfo: { hasPreviousPage: false, startCursor: null } }, + } } } }); + } + if (write) { + if (credential !== 'fixture-writer' || path !== project + '/issues/comments/55' && path !== project + '/issues/11/comments') { + return reply({ message: 'Unsupported fixture mutation' }, 405); + } + const data = []; + for await (const chunk of request) data.push(chunk); + const { body } = JSON.parse(Buffer.concat(data)); + if (state.refuseWrite) return reply({ message: 'Fixture write refused' }, 403); + state.comment = { ...canonical, body }; + return reply({ id: 55, body }); + } + return reply({ message: 'Unrecognized fixture endpoint' }, 404); +}); + +async function invoke(label, { kind = 'progress', runId = 23, attempt = 1, verifiedBody } = {}) { + const eventPath = join(output, label + '.event.json'); + const work = { version: 1, kind, source, runId, attempt, ...(verifiedBody === undefined ? {} : { verifiedBody }) }; + writeFileSync(eventPath, JSON.stringify({ inputs: { pull_number: '11', work: JSON.stringify(work), operation: (kind === 'progress' ? String(state.sequence) + ':' : '') + createHash('sha256').update(JSON.stringify(work)).digest('hex') }, repository: { id: 19 } })); + const api = 'http://127.0.0.1:' + server.address().port; + const env = { PATH: process.env.PATH, HOME: join(output, 'fixture-home'), + GITHUB_API_URL: api, GITHUB_GRAPHQL_URL: api + '/graphql', GITHUB_SERVER_URL: 'https://github.com', + GITHUB_REPOSITORY: 'owner/project', GITHUB_EVENT_NAME: 'workflow_dispatch', GITHUB_ACTOR: 'fixture-bot', + GITHUB_REF: 'refs/heads/master', GITHUB_WORKFLOW_REF: 'owner/project/' + cardPath + '@refs/heads/master', + GITHUB_EVENT_PATH: eventPath, GITHUB_RUN_ID: '888', GITHUB_RUN_ATTEMPT: '1', GITHUB_ACTIONS: 'true', + INPUT_TOKEN: 'fixture-writer', COPILOT_EVIDENCE_TOKEN: 'fixture-reader', COPILOT_BUGBOT_STATUS_CARD_WORKFLOW: 'write-v1', + 'INPUT_PULL-REQUESTS-LOCALE': 'en-US' }; + const firstOperation = state.operations.length; + const observed = await new Promise((done, reject) => { + const child = spawn(process.execPath, [bundle], { env, cwd: output, stdio: ['ignore', 'pipe', 'pipe'] }); + const data = []; + const timer = setTimeout(() => { child.kill(); reject(new Error(label + ' timed out')); }, 15000); + child.stdout.on('data', value => data.push(value)); + child.stderr.on('data', value => data.push(value)); + child.once('error', reject); + child.once('close', code => { clearTimeout(timer); done({ code, log: Buffer.concat(data).toString('utf8') }); }); + }); + const operations = state.operations.slice(firstOperation); + const writes = operations.filter(operation => operation.write); + writeFileSync(join(output, label + '.log'), observed.log); + result.outcomes.push({ label, exit: observed.code, reads: operations.length - writes.length, writes, + logResult: observed.log.includes('publication updated') ? 'updated' + : observed.log.includes('publication unchanged') ? 'unchanged' + : observed.log.includes('publication created') ? 'created' + : observed.log.includes('No current Bugbot status card') ? 'declined' : 'other' }); + return { ...observed, writes }; +} + +(async () => { + await new Promise(done => server.listen(0, '127.0.0.1', done)); + try { + state = makeState(); + let run = await invoke('new-progress'); + assert.equal(run.code, 0, run.log); + assert.deepEqual(run.writes.map(write => [write.method, write.path]), [['PATCH', project + '/issues/comments/55']]); + assert.match(state.comment.body, /18\/50 partitions validated/u); + assert.match(state.comment.body, /remaining partitions \(32\)/u); + assert(state.comment.body.endsWith(previous)); + run = await invoke('identical-progress'); + assert.equal(run.code, 0, run.log); + assert.equal(run.writes.length, 0); + run = await invoke('independent-recheck', { kind: 'state-refresh', runId: 24, verifiedBody: current }); + assert.equal(run.code, 0, run.log); + assert.equal(run.writes.length, 1); + assert.match(state.comment.body, /18\/50 partitions validated/u); + assert(state.comment.body.endsWith(current)); + run = await invoke('terminal-publication', { kind: 'analysis-result', verifiedBody: current }); + assert.equal(run.code, 0, run.log); + assert.equal(run.writes.length, 1); + assert(!state.comment.body.includes('partitions validated')); + assert(state.comment.body.startsWith(current)); + run = await invoke('delayed-progress-after-terminal'); + assert.equal(run.code, 0, run.log); + assert.equal(run.writes.length, 0); + state.run.run_attempt = 2; state.sequence = 1; state.partitions = 2; + run = await invoke('replaced-attempt'); + assert.equal(run.code, 1, run.log); + assert.equal(run.writes.length, 0); + run = await invoke('replacement-retry', { attempt: 2 }); + assert.equal(run.code, 0, run.log); + assert.equal(run.writes.length, 1); + assert.match(state.comment.body, /2\/50 partitions validated/u); + state = makeState({ pushAfterConversation: true }); + run = await invoke('push-during-preflight'); + assert.equal(run.code, 1, run.log); + assert.equal(run.writes.length, 0); + state = makeState({ denyPrivateRead: true }); + run = await invoke('denied-private-pr-read'); + assert.notEqual(run.code, 0, run.log); + assert.equal(run.writes.length, 0); + assert.equal(state.comment.body, previous); + state = makeState({ refuseWrite: true }); + run = await invoke('comment-write-refusal', { kind: 'analysis-result', verifiedBody: current }); + assert.equal(run.code, 1, run.log); + assert.equal(run.writes.length, 1); + assert.equal(state.comment.body, previous); + state = makeState({ comment: undefined }); + run = await invoke('verified-empty-conversation'); + assert.equal(run.code, 0, run.log); + assert.deepEqual(run.writes.map(write => [write.method, write.path]), [['POST', project + '/issues/11/comments']]); + assert.match(state.comment.body, /No verified review yet/u); + state = makeState({ missingConversation: true }); + run = await invoke('missing-conversation'); + result.missingConversationRejected = run.code !== 0 && run.writes.length === 0; + assert(result.missingConversationRejected, 'An unavailable conversation must not create a status card.'); + assert.equal(state.comment.body, previous); + const legacy = previous.split('\n').slice(1).join('\n'); + state = makeState({ comment: { ...canonical, body: legacy } }); + run = await invoke('legacy-card-progress'); + assert.equal(run.code, 0, run.log); + assert.deepEqual(run.writes.map(write => [write.method, write.path]), [['PATCH', project + '/issues/comments/55']]); + assert(state.comment.body.endsWith(legacy)); + run = await invoke('legacy-card-upgrade', { kind: 'analysis-result', verifiedBody: current }); + assert.equal(run.code, 0, run.log); + assert.deepEqual(run.writes.map(write => [write.method, write.path]), [['PATCH', project + '/issues/comments/55']]); + assert(state.comment.body.startsWith(current)); + const before = state.operations.length; + const response = await fetch(`http://127.0.0.1:${server.address().port}/graphql`, { + method: 'POST', headers: { authorization: 'token fixture-writer', 'content-type': 'application/json' }, + body: JSON.stringify({ query: 'mutation Audit { forbidden }' }), + }); + assert.equal(response.status, 400); + const attempts = state.operations.slice(before); + assert.deepEqual(attempts, [{ method: 'POST', path: '/graphql', write: true }]); + result.rejectedMutationAudited = true; + } finally { + writeFileSync(join(output, 'results.json'), JSON.stringify(result, null, 2) + '\n'); + await new Promise(done => server.close(done)); + } +})().catch(error => { console.error(error.message); process.exitCode = 1; }); diff --git a/quality/bugbot/evidence/issue-977/packaged-results.json b/quality/bugbot/evidence/issue-977/packaged-results.json new file mode 100644 index 000000000..9da3346f3 --- /dev/null +++ b/quality/bugbot/evidence/issue-977/packaged-results.json @@ -0,0 +1,159 @@ +{ + "realGitHubWriteAttempts": 0, + "modelCalls": 0, + "installed": false, + "nativeCanary": false, + "sourceCommit": "1b024481d9d86cb4d4b10eb7f8569f9c8e2f0981", + "packageSha256": "8bd2355979f551142848a0c9fdc3f5f8690fecb8a12da4910a0aad65e155e930", + "evidence": "packaged action with synthetic actions and comments on a loopback-only GitHub API", + "outcomes": [ + { + "label": "new-progress", + "exit": 0, + "reads": 21, + "writes": [ + { + "method": "PATCH", + "path": "/repos/owner/project/issues/comments/55", + "write": true + } + ], + "logResult": "updated" + }, + { + "label": "identical-progress", + "exit": 0, + "reads": 13, + "writes": [], + "logResult": "unchanged" + }, + { + "label": "independent-recheck", + "exit": 0, + "reads": 21, + "writes": [ + { + "method": "PATCH", + "path": "/repos/owner/project/issues/comments/55", + "write": true + } + ], + "logResult": "updated" + }, + { + "label": "terminal-publication", + "exit": 0, + "reads": 18, + "writes": [ + { + "method": "PATCH", + "path": "/repos/owner/project/issues/comments/55", + "write": true + } + ], + "logResult": "updated" + }, + { + "label": "delayed-progress-after-terminal", + "exit": 0, + "reads": 13, + "writes": [], + "logResult": "unchanged" + }, + { + "label": "replaced-attempt", + "exit": 1, + "reads": 6, + "writes": [], + "logResult": "declined" + }, + { + "label": "replacement-retry", + "exit": 0, + "reads": 21, + "writes": [ + { + "method": "PATCH", + "path": "/repos/owner/project/issues/comments/55", + "write": true + } + ], + "logResult": "updated" + }, + { + "label": "push-during-preflight", + "exit": 1, + "reads": 19, + "writes": [], + "logResult": "declined" + }, + { + "label": "denied-private-pr-read", + "exit": 1, + "reads": 3, + "writes": [], + "logResult": "other" + }, + { + "label": "comment-write-refusal", + "exit": 1, + "reads": 18, + "writes": [ + { + "method": "PATCH", + "path": "/repos/owner/project/issues/comments/55", + "write": true + } + ], + "logResult": "other" + }, + { + "label": "verified-empty-conversation", + "exit": 0, + "reads": 21, + "writes": [ + { + "method": "POST", + "path": "/repos/owner/project/issues/11/comments", + "write": true + } + ], + "logResult": "created" + }, + { + "label": "missing-conversation", + "exit": 1, + "reads": 13, + "writes": [], + "logResult": "declined" + }, + { + "label": "legacy-card-progress", + "exit": 0, + "reads": 21, + "writes": [ + { + "method": "PATCH", + "path": "/repos/owner/project/issues/comments/55", + "write": true + } + ], + "logResult": "updated" + }, + { + "label": "legacy-card-upgrade", + "exit": 0, + "reads": 18, + "writes": [ + { + "method": "PATCH", + "path": "/repos/owner/project/issues/comments/55", + "write": true + } + ], + "logResult": "updated" + } + ], + "missingConversationRejected": true, + "rejectedMutationAudited": true +} diff --git a/quality/bugbot/evidence/issue-977/proposed-workflow.yml b/quality/bugbot/evidence/issue-977/proposed-workflow.yml new file mode 100644 index 000000000..eb8de3ff4 --- /dev/null +++ b/quality/bugbot/evidence/issue-977/proposed-workflow.yml @@ -0,0 +1,47 @@ +name: Copilot - Bugbot Status Card +run-name: Bugbot status · PR ${{ inputs.pull_number }} · ${{ inputs.operation }} + +on: + workflow_dispatch: + inputs: + pull_number: + description: Pull request number + required: true + type: number + operation: + description: SHA-256 correlation of the versioned handoff; not publication authority + required: true + type: string + work: + description: Versioned publication handoff + required: true + type: string + +jobs: + publish: + name: Publish Bugbot status card + if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} + runs-on: [self-hosted, codex, Linux] + timeout-minutes: 5 + concurrency: + group: copilot-bugbot-status-${{ github.repository_id }}-${{ inputs.pull_number }} + queue: max + cancel-in-progress: false + permissions: + actions: read + checks: read + contents: read + issues: read + pull-requests: read + steps: + - uses: actions/checkout@v5 + with: + persist-credentials: false + - name: Publish canonical comment + uses: vypdev/copilot@1b024481d9d86cb4d4b10eb7f8569f9c8e2f0981 + with: + token: ${{ secrets.PAT }} + pull-requests-locale: ${{ vars.PULL_REQUESTS_LOCALE || vars.REPOSITORY_LOCALE || 'en-US' }} + env: + COPILOT_BUGBOT_STATUS_CARD_WORKFLOW: 'write-v1' + COPILOT_EVIDENCE_TOKEN: ${{ github.token }} diff --git a/quality/bugbot/evidence/issue-977/push-during-preflight.log.gz b/quality/bugbot/evidence/issue-977/push-during-preflight.log.gz new file mode 100644 index 000000000..2def114b7 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/push-during-preflight.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/replaced-attempt.log.gz b/quality/bugbot/evidence/issue-977/replaced-attempt.log.gz new file mode 100644 index 000000000..2def114b7 Binary files /dev/null and b/quality/bugbot/evidence/issue-977/replaced-attempt.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/replacement-retry.log.gz b/quality/bugbot/evidence/issue-977/replacement-retry.log.gz new file mode 100644 index 000000000..8cd77ebeb Binary files /dev/null and b/quality/bugbot/evidence/issue-977/replacement-retry.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/terminal-publication.log.gz b/quality/bugbot/evidence/issue-977/terminal-publication.log.gz new file mode 100644 index 000000000..8cd77ebeb Binary files /dev/null and b/quality/bugbot/evidence/issue-977/terminal-publication.log.gz differ diff --git a/quality/bugbot/evidence/issue-977/verified-empty-conversation.log.gz b/quality/bugbot/evidence/issue-977/verified-empty-conversation.log.gz new file mode 100644 index 000000000..5c8935cca Binary files /dev/null and b/quality/bugbot/evidence/issue-977/verified-empty-conversation.log.gz differ diff --git a/specs/CATALOG.md b/specs/CATALOG.md index ab1f8e793..d87ee8a64 100644 --- a/specs/CATALOG.md +++ b/specs/CATALOG.md @@ -13,7 +13,7 @@ debt or convert unknown historic intent into a design decision. | `github-communication-experience` | Implemented | English-default, localized, semantic, bounded and idempotent product messages across GitHub and repository-aware operator surfaces; complete acceptance batches and cards with stable source identities, verified published SDD provenance, shared complete-inventory text allocation, precise response diagnostics and same-head requirement evidence before Commit progress publication; shared bounded complete-batch recovery for attributable completed acceptance-field length or completion failures; bounded closed-fact recovery and compact large-inventory assessment, exact original hard allocations, explicit admission counts and non-retryable length exhaustion with separate live-provider qualification; exact JSON-byte allocation and one shared source-part size replacement for both framed profiles, captured request contracts, receipt quota revalidation and nonretryable unit-specific exhaustion; shared same-profile complete-batch correction for otherwise-valid repeated citations with current-request origin binding, unchanged evidence gates and nonretryable citation exhaustion | [Semantic GitHub communication and repository localization](./semantic-github-publication-and-notification.md) + 11 companion | 462 paths · 2026-11-18 | | `release-orchestration` | Implemented | Release and hotfix promotion, publication, bounded merge readiness recovery, and receipt-verified reconciliation without republication; explicit native-guarded replacement of closed unpublished candidates with complete fresh validation and bounded audit history | [Configurable production-first release orchestration](./configurable-release-orchestration.md) + 3 companion | 91 paths · 2026-10-30 | | `merge-queue-readiness` | Implemented | Fail-closed validation of required checks and merge-group workflow support; optional manual-only RepoWise analysis with independent CI and verified required-check migration; cached RepoWise exports and bounded full-history secret processing with truthful completeness and resource evidence | [Merge queue readiness and effective target rules](./merge-queue-readiness.md) | 29 paths · 2026-10-21 | -| `bugbot-review-state-reconciliation` | Implemented | Reconcile review snapshots, findings, threads, comments, and check conclusions | [Bugbot review-state reconciliation](./bugbot-review-state-reconciliation.md) | 106 paths · 2026-11-19 | +| `bugbot-review-state-reconciliation` | Implemented | Reconcile review snapshots, findings, threads, comments, and check conclusions | [Bugbot review-state reconciliation](./bugbot-review-state-reconciliation.md) | 110 paths · 2026-11-19 | | `execution-lifecycle` | Implemented | Shared GitHub Action lifecycle with pinned native resource/lane coordination proof, conservative predecessor fencing, routing and durable user-facing results | [Execution admission, queueing, routing, and result publication](./execution-admission-queue-and-publication.md) + 4 companion | 161 paths · 2026-10-29 | | `architecture-quality-hardening` | Implemented | Close verified concurrency, error-contract, context-coupling, fan-out, setup/doctor, and provider-policy risks in dependency order | [Architecture quality and scalability hardening](./architecture-quality-and-scalability-hardening.md) + 1 companion | 72 paths · 2026-10-13 | | `setup-and-doctor` | Implemented | Plan, validate, provision, and audit a repository installation without exposing credentials | [Setup, configuration, credentials, and doctor](./setup-configuration-credentials-and-doctor.md) + 6 companion | 334 paths · 2026-10-29 | @@ -75,9 +75,9 @@ debt or convert unknown historic intent into a design decision. - Specifications: [`specs/bugbot-review-state-reconciliation.md`](./bugbot-review-state-reconciliation.md) - Workflows: [`.github/workflows/copilot_commit.yml`](../.github/workflows/copilot_commit.yml) · [`.github/workflows/copilot_pull_request.yml`](../.github/workflows/copilot_pull_request.yml) · [`.github/workflows/copilot_pull_request_comment.yml`](../.github/workflows/copilot_pull_request_comment.yml) · [`.github/workflows/copilot_pull_request_review_state.yml`](../.github/workflows/copilot_pull_request_review_state.yml) · [`setup/workflows/copilot_pull_request.yml`](../setup/workflows/copilot_pull_request.yml) · [`setup/workflows/copilot_pull_request_review_state.yml`](../setup/workflows/copilot_pull_request_review_state.yml) · [`.github/workflows/copilot_bugbot_status_card.yml`](../.github/workflows/copilot_bugbot_status_card.yml) - Entrypoints: [`src/application/usecases/steps/commit/detect_potential_problems_workflow.ts`](../src/application/usecases/steps/commit/detect_potential_problems_workflow.ts) · [`src/application/usecases/steps/commit/bugbot/reconcile_bugbot_review_state_use_case.ts`](../src/application/usecases/steps/commit/bugbot/reconcile_bugbot_review_state_use_case.ts) · [`src/actions/github_action_completion.ts`](../src/actions/github_action_completion.ts) · [`src/api.ts`](../src/api.ts) -- Core code: [`scripts/coverage-budgets.json`](../scripts/coverage-budgets.json) · [`src/domain/bugbot/review_state.ts`](../src/domain/bugbot/review_state.ts) · [`src/domain/bugbot/review_projection.ts`](../src/domain/bugbot/review_projection.ts) · [`src/application/policies/bugbot_reconciliation_policy.ts`](../src/application/policies/bugbot_reconciliation_policy.ts) · [`src/application/policies/bugbot_event_ownership_policy.ts`](../src/application/policies/bugbot_event_ownership_policy.ts) · [`src/application/policies/bugbot_result_finding_state_projection_policy.ts`](../src/application/policies/bugbot_result_finding_state_projection_policy.ts) · [`src/application/policies/bugbot_telemetry_projection_policy.ts`](../src/application/policies/bugbot_telemetry_projection_policy.ts) · [`src/application/policies/bugbot_message_catalog.ts`](../src/application/policies/bugbot_message_catalog.ts) · [`src/application/policies/bugbot_finding_marker_policy.ts`](../src/application/policies/bugbot_finding_marker_policy.ts) · [`src/application/policies/bugbot_review_presentation_policy.ts`](../src/application/policies/bugbot_review_presentation_policy.ts) · [`src/application/policies/action_summary_policy.ts`](../src/application/policies/action_summary_policy.ts) · [`src/application/policies/copilot_evidence_policy.ts`](../src/application/policies/copilot_evidence_policy.ts) · [`src/application/policies/lifecycle_state_policy.ts`](../src/application/policies/lifecycle_state_policy.ts) · [`src/application/policies/status_command_policy.ts`](../src/application/policies/status_command_policy.ts) · [`src/application/usecases/steps/common/publish_resume_workflow.ts`](../src/application/usecases/steps/common/publish_resume_workflow.ts) · [`src/application/usecases/steps/commit/bugbot/load_bugbot_context_use_case.ts`](../src/application/usecases/steps/commit/bugbot/load_bugbot_context_use_case.ts) · [`src/application/usecases/steps/commit/bugbot/schema.ts`](../src/application/usecases/steps/commit/bugbot/schema.ts) · [`src/application/usecases/steps/commit/bugbot/prepare_bugbot_findings_policy.ts`](../src/application/usecases/steps/commit/bugbot/prepare_bugbot_findings_policy.ts) · [`src/application/usecases/steps/commit/bugbot/publish_pr_review_comments.ts`](../src/application/usecases/steps/commit/bugbot/publish_pr_review_comments.ts) · [`src/application/usecases/steps/commit/bugbot/synchronize_bugbot_review_presentation_use_case.ts`](../src/application/usecases/steps/commit/bugbot/synchronize_bugbot_review_presentation_use_case.ts) · [`src/application/policies/bugbot_status_count_marker_policy.ts`](../src/application/policies/bugbot_status_count_marker_policy.ts) · [`src/application/errors/bugbot_mutation_error.ts`](../src/application/errors/bugbot_mutation_error.ts) · [`src/data/repository/pull_request/pull_request_review_error_metadata.ts`](../src/data/repository/pull_request/pull_request_review_error_metadata.ts) · [`src/domain/bugbot/finding.ts`](../src/domain/bugbot/finding.ts) · [`src/application/usecases/steps/commit/bugbot/analyze_bugbot_revision_use_case.ts`](../src/application/usecases/steps/commit/bugbot/analyze_bugbot_revision_use_case.ts) · [`src/application/usecases/steps/commit/bugbot/publish_findings_use_case.ts`](../src/application/usecases/steps/commit/bugbot/publish_findings_use_case.ts) · [`scripts/validate-workflow-contract.cjs`](../scripts/validate-workflow-contract.cjs) · [`src/application/policies/bugbot_resolution_eligibility_policy.ts`](../src/application/policies/bugbot_resolution_eligibility_policy.ts) · [`src/application/usecases/steps/commit/bugbot/resolve_pull_request_finding.ts`](../src/application/usecases/steps/commit/bugbot/resolve_pull_request_finding.ts) · [`src/application/usecases/steps/commit/bugbot/mark_findings_resolved_workflow.ts`](../src/application/usecases/steps/commit/bugbot/mark_findings_resolved_workflow.ts) · [`src/application/usecases/steps/commit/bugbot/verify_reopened_finding_thread.ts`](../src/application/usecases/steps/commit/bugbot/verify_reopened_finding_thread.ts) · [`src/application/ports/bugbot_pull_request_resolution_ports.ts`](../src/application/ports/bugbot_pull_request_resolution_ports.ts) · [`src/application/ports/bugbot_pull_request_write_ports.ts`](../src/application/ports/bugbot_pull_request_write_ports.ts) · [`src/application/ports/pull_request_review_comment_ports.ts`](../src/application/ports/pull_request_review_comment_ports.ts) · [`src/infrastructure/composition/bugbot_scm_port_factory.ts`](../src/infrastructure/composition/bugbot_scm_port_factory.ts) · [`src/application/policies/bugbot_commit_progress_link_policy.ts`](../src/application/policies/bugbot_commit_progress_link_policy.ts) · [`src/infrastructure/github/github_bugbot_interrupted_check.ts`](../src/infrastructure/github/github_bugbot_interrupted_check.ts) · [`src/application/policies/bugbot_progress_check_observation_policy.ts`](../src/application/policies/bugbot_progress_check_observation_policy.ts) · [`src/application/policies/bugbot_status_card_publication_policy.ts`](../src/application/policies/bugbot_status_card_publication_policy.ts) · [`src/infrastructure/github/github_bugbot_status_card_workflow.ts`](../src/infrastructure/github/github_bugbot_status_card_workflow.ts) · [`src/infrastructure/github/github_bugbot_status_card_dispatch.ts`](../src/infrastructure/github/github_bugbot_status_card_dispatch.ts) · [`src/infrastructure/github/native_list_pagination.ts`](../src/infrastructure/github/native_list_pagination.ts) -- Tests: [`src/domain/bugbot/__tests__/review_state.test.ts`](../src/domain/bugbot/__tests__/review_state.test.ts) · [`src/domain/bugbot/__tests__/review_projection.test.ts`](../src/domain/bugbot/__tests__/review_projection.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/schema.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/schema.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/prepare_bugbot_findings.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/prepare_bugbot_findings.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/reconcile_bugbot_review_state_integration.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/reconcile_bugbot_review_state_integration.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/synchronize_bugbot_review_presentation_use_case.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/synchronize_bugbot_review_presentation_use_case.test.ts) · [`src/application/policies/__tests__/bugbot_result_finding_state_projection_policy.test.ts`](../src/application/policies/__tests__/bugbot_result_finding_state_projection_policy.test.ts) · [`src/application/policies/__tests__/bugbot_event_ownership_policy.test.ts`](../src/application/policies/__tests__/bugbot_event_ownership_policy.test.ts) · [`src/application/policies/__tests__/bugbot_telemetry_projection_policy.test.ts`](../src/application/policies/__tests__/bugbot_telemetry_projection_policy.test.ts) · [`src/application/policies/__tests__/bugbot_message_catalog.test.ts`](../src/application/policies/__tests__/bugbot_message_catalog.test.ts) · [`src/application/policies/__tests__/bugbot_finding_marker_policy.test.ts`](../src/application/policies/__tests__/bugbot_finding_marker_policy.test.ts) · [`src/application/policies/__tests__/bugbot_review_presentation_policy.test.ts`](../src/application/policies/__tests__/bugbot_review_presentation_policy.test.ts) · [`src/application/policies/__tests__/action_summary_policy.test.ts`](../src/application/policies/__tests__/action_summary_policy.test.ts) · [`src/application/policies/__tests__/copilot_evidence_policy.test.ts`](../src/application/policies/__tests__/copilot_evidence_policy.test.ts) · [`src/application/policies/__tests__/lifecycle_state_policy.test.ts`](../src/application/policies/__tests__/lifecycle_state_policy.test.ts) · [`src/application/policies/__tests__/status_command_policy.test.ts`](../src/application/policies/__tests__/status_command_policy.test.ts) · [`src/actions/__tests__/github_action_completion.test.ts`](../src/actions/__tests__/github_action_completion.test.ts) · [`src/application/usecases/steps/common/__tests__/publish_resume_use_case.test.ts`](../src/application/usecases/steps/common/__tests__/publish_resume_use_case.test.ts) · [`src/application/usecases/actions/__tests__/synchronize_lifecycle_state_use_case.test.ts`](../src/application/usecases/actions/__tests__/synchronize_lifecycle_state_use_case.test.ts) · [`src/application/usecases/steps/commit/__tests__/detect_potential_problems_use_case.test.ts`](../src/application/usecases/steps/commit/__tests__/detect_potential_problems_use_case.test.ts) · [`src/infrastructure/composition/__tests__/pull_request_use_case_composition_root.test.ts`](../src/infrastructure/composition/__tests__/pull_request_use_case_composition_root.test.ts) · [`src/tooling/__tests__/validate_workflow_contract.test.ts`](../src/tooling/__tests__/validate_workflow_contract.test.ts) · [`src/application/errors/__tests__/bugbot_mutation_error.test.ts`](../src/application/errors/__tests__/bugbot_mutation_error.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/finding_mutation_recovery.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/finding_mutation_recovery.test.ts) · [`src/domain/bugbot/__tests__/finding.test.ts`](../src/domain/bugbot/__tests__/finding.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/finding_identity_replay.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/finding_identity_replay.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/analyze_bugbot_revision_use_case.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/analyze_bugbot_revision_use_case.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/publish_findings_use_case.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/publish_findings_use_case.test.ts) · [`src/application/policies/__tests__/bugbot_resolution_eligibility_policy.test.ts`](../src/application/policies/__tests__/bugbot_resolution_eligibility_policy.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/reopened_dismissal_reconciliation.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/reopened_dismissal_reconciliation.test.ts) · [`src/infrastructure/composition/__tests__/bugbot_scm_port_factory.test.ts`](../src/infrastructure/composition/__tests__/bugbot_scm_port_factory.test.ts) · [`src/application/ports/__tests__/bugbot_port_boundaries.test.ts`](../src/application/ports/__tests__/bugbot_port_boundaries.test.ts) · [`src/application/policies/__tests__/bugbot_commit_progress_link_policy.test.ts`](../src/application/policies/__tests__/bugbot_commit_progress_link_policy.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_interrupted_check.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_interrupted_check.test.ts) · [`src/application/policies/__tests__/bugbot_progress_check_observation_policy.test.ts`](../src/application/policies/__tests__/bugbot_progress_check_observation_policy.test.ts) · [`src/data/repository/__tests__/copilot_evidence_repository.test.ts`](../src/data/repository/__tests__/copilot_evidence_repository.test.ts) · [`quality/bugbot/evidence/issue-950/status-card-publication/publisher.test.cjs`](../quality/bugbot/evidence/issue-950/status-card-publication/publisher.test.cjs) · [`quality/bugbot/evidence/issue-950/status-card-publication/packaged-canary.cjs`](../quality/bugbot/evidence/issue-950/status-card-publication/packaged-canary.cjs) · [`src/application/policies/__tests__/bugbot_status_card_publication_policy.test.ts`](../src/application/policies/__tests__/bugbot_status_card_publication_policy.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_workflow.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_workflow.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_lane.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_lane.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_dispatch.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_dispatch.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_observation.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_observation.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_handoff.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_handoff.test.ts) -- User documentation: [`docs/bugbot/detection.mdx`](../docs/bugbot/detection.mdx) · [`docs/bugbot/finding-publication.mdx`](../docs/bugbot/finding-publication.mdx) · [`docs/bugbot/quality-observability.mdx`](../docs/bugbot/quality-observability.mdx) · [`docs/bugbot/failure-scenarios.mdx`](../docs/bugbot/failure-scenarios.mdx) · [`docs/bugbot/configuration.mdx`](../docs/bugbot/configuration.mdx) · [`docs/bugbot/how-it-works.mdx`](../docs/bugbot/how-it-works.mdx) · [`docs/bugbot/programmatic-api.mdx`](../docs/bugbot/programmatic-api.mdx) · [`docs/pull-requests/workflow-setup.mdx`](../docs/pull-requests/workflow-setup.mdx) · [`docs/issues/comment-commands.mdx`](../docs/issues/comment-commands.mdx) +- Core code: [`scripts/coverage-budgets.json`](../scripts/coverage-budgets.json) · [`src/domain/bugbot/review_state.ts`](../src/domain/bugbot/review_state.ts) · [`src/domain/bugbot/review_projection.ts`](../src/domain/bugbot/review_projection.ts) · [`src/application/policies/bugbot_reconciliation_policy.ts`](../src/application/policies/bugbot_reconciliation_policy.ts) · [`src/application/policies/bugbot_event_ownership_policy.ts`](../src/application/policies/bugbot_event_ownership_policy.ts) · [`src/application/policies/bugbot_result_finding_state_projection_policy.ts`](../src/application/policies/bugbot_result_finding_state_projection_policy.ts) · [`src/application/policies/bugbot_telemetry_projection_policy.ts`](../src/application/policies/bugbot_telemetry_projection_policy.ts) · [`src/application/policies/bugbot_message_catalog.ts`](../src/application/policies/bugbot_message_catalog.ts) · [`src/application/policies/bugbot_finding_marker_policy.ts`](../src/application/policies/bugbot_finding_marker_policy.ts) · [`src/application/policies/bugbot_review_presentation_policy.ts`](../src/application/policies/bugbot_review_presentation_policy.ts) · [`src/application/policies/action_summary_policy.ts`](../src/application/policies/action_summary_policy.ts) · [`src/application/policies/copilot_evidence_policy.ts`](../src/application/policies/copilot_evidence_policy.ts) · [`src/application/policies/lifecycle_state_policy.ts`](../src/application/policies/lifecycle_state_policy.ts) · [`src/application/policies/status_command_policy.ts`](../src/application/policies/status_command_policy.ts) · [`src/application/usecases/steps/common/publish_resume_workflow.ts`](../src/application/usecases/steps/common/publish_resume_workflow.ts) · [`src/application/usecases/steps/commit/bugbot/load_bugbot_context_use_case.ts`](../src/application/usecases/steps/commit/bugbot/load_bugbot_context_use_case.ts) · [`src/application/usecases/steps/commit/bugbot/schema.ts`](../src/application/usecases/steps/commit/bugbot/schema.ts) · [`src/application/usecases/steps/commit/bugbot/prepare_bugbot_findings_policy.ts`](../src/application/usecases/steps/commit/bugbot/prepare_bugbot_findings_policy.ts) · [`src/application/usecases/steps/commit/bugbot/publish_pr_review_comments.ts`](../src/application/usecases/steps/commit/bugbot/publish_pr_review_comments.ts) · [`src/application/usecases/steps/commit/bugbot/synchronize_bugbot_review_presentation_use_case.ts`](../src/application/usecases/steps/commit/bugbot/synchronize_bugbot_review_presentation_use_case.ts) · [`src/application/policies/bugbot_status_count_marker_policy.ts`](../src/application/policies/bugbot_status_count_marker_policy.ts) · [`src/application/errors/bugbot_mutation_error.ts`](../src/application/errors/bugbot_mutation_error.ts) · [`src/data/repository/pull_request/pull_request_review_error_metadata.ts`](../src/data/repository/pull_request/pull_request_review_error_metadata.ts) · [`src/domain/bugbot/finding.ts`](../src/domain/bugbot/finding.ts) · [`src/application/usecases/steps/commit/bugbot/analyze_bugbot_revision_use_case.ts`](../src/application/usecases/steps/commit/bugbot/analyze_bugbot_revision_use_case.ts) · [`src/application/usecases/steps/commit/bugbot/publish_findings_use_case.ts`](../src/application/usecases/steps/commit/bugbot/publish_findings_use_case.ts) · [`scripts/validate-workflow-contract.cjs`](../scripts/validate-workflow-contract.cjs) · [`src/application/policies/bugbot_resolution_eligibility_policy.ts`](../src/application/policies/bugbot_resolution_eligibility_policy.ts) · [`src/application/usecases/steps/commit/bugbot/resolve_pull_request_finding.ts`](../src/application/usecases/steps/commit/bugbot/resolve_pull_request_finding.ts) · [`src/application/usecases/steps/commit/bugbot/mark_findings_resolved_workflow.ts`](../src/application/usecases/steps/commit/bugbot/mark_findings_resolved_workflow.ts) · [`src/application/usecases/steps/commit/bugbot/verify_reopened_finding_thread.ts`](../src/application/usecases/steps/commit/bugbot/verify_reopened_finding_thread.ts) · [`src/application/ports/bugbot_pull_request_resolution_ports.ts`](../src/application/ports/bugbot_pull_request_resolution_ports.ts) · [`src/application/ports/bugbot_pull_request_write_ports.ts`](../src/application/ports/bugbot_pull_request_write_ports.ts) · [`src/application/ports/pull_request_review_comment_ports.ts`](../src/application/ports/pull_request_review_comment_ports.ts) · [`src/infrastructure/composition/bugbot_scm_port_factory.ts`](../src/infrastructure/composition/bugbot_scm_port_factory.ts) · [`src/application/policies/bugbot_commit_progress_link_policy.ts`](../src/application/policies/bugbot_commit_progress_link_policy.ts) · [`src/infrastructure/github/github_bugbot_interrupted_check.ts`](../src/infrastructure/github/github_bugbot_interrupted_check.ts) · [`src/application/policies/bugbot_progress_check_observation_policy.ts`](../src/application/policies/bugbot_progress_check_observation_policy.ts) · [`src/application/policies/bugbot_status_card_publication_policy.ts`](../src/application/policies/bugbot_status_card_publication_policy.ts) · [`src/infrastructure/github/github_bugbot_status_card_workflow.ts`](../src/infrastructure/github/github_bugbot_status_card_workflow.ts) · [`src/infrastructure/github/github_bugbot_status_card_dispatch.ts`](../src/infrastructure/github/github_bugbot_status_card_dispatch.ts) · [`src/infrastructure/github/native_list_pagination.ts`](../src/infrastructure/github/native_list_pagination.ts) · [`quality/bugbot/evidence/issue-977/installation-state.cjs`](../quality/bugbot/evidence/issue-977/installation-state.cjs) · [`quality/bugbot/evidence/issue-977/packaged-canary.cjs`](../quality/bugbot/evidence/issue-977/packaged-canary.cjs) +- Tests: [`src/domain/bugbot/__tests__/review_state.test.ts`](../src/domain/bugbot/__tests__/review_state.test.ts) · [`src/domain/bugbot/__tests__/review_projection.test.ts`](../src/domain/bugbot/__tests__/review_projection.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/schema.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/schema.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/prepare_bugbot_findings.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/prepare_bugbot_findings.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/reconcile_bugbot_review_state_integration.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/reconcile_bugbot_review_state_integration.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/synchronize_bugbot_review_presentation_use_case.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/synchronize_bugbot_review_presentation_use_case.test.ts) · [`src/application/policies/__tests__/bugbot_result_finding_state_projection_policy.test.ts`](../src/application/policies/__tests__/bugbot_result_finding_state_projection_policy.test.ts) · [`src/application/policies/__tests__/bugbot_event_ownership_policy.test.ts`](../src/application/policies/__tests__/bugbot_event_ownership_policy.test.ts) · [`src/application/policies/__tests__/bugbot_telemetry_projection_policy.test.ts`](../src/application/policies/__tests__/bugbot_telemetry_projection_policy.test.ts) · [`src/application/policies/__tests__/bugbot_message_catalog.test.ts`](../src/application/policies/__tests__/bugbot_message_catalog.test.ts) · [`src/application/policies/__tests__/bugbot_finding_marker_policy.test.ts`](../src/application/policies/__tests__/bugbot_finding_marker_policy.test.ts) · [`src/application/policies/__tests__/bugbot_review_presentation_policy.test.ts`](../src/application/policies/__tests__/bugbot_review_presentation_policy.test.ts) · [`src/application/policies/__tests__/action_summary_policy.test.ts`](../src/application/policies/__tests__/action_summary_policy.test.ts) · [`src/application/policies/__tests__/copilot_evidence_policy.test.ts`](../src/application/policies/__tests__/copilot_evidence_policy.test.ts) · [`src/application/policies/__tests__/lifecycle_state_policy.test.ts`](../src/application/policies/__tests__/lifecycle_state_policy.test.ts) · [`src/application/policies/__tests__/status_command_policy.test.ts`](../src/application/policies/__tests__/status_command_policy.test.ts) · [`src/actions/__tests__/github_action_completion.test.ts`](../src/actions/__tests__/github_action_completion.test.ts) · [`src/application/usecases/steps/common/__tests__/publish_resume_use_case.test.ts`](../src/application/usecases/steps/common/__tests__/publish_resume_use_case.test.ts) · [`src/application/usecases/actions/__tests__/synchronize_lifecycle_state_use_case.test.ts`](../src/application/usecases/actions/__tests__/synchronize_lifecycle_state_use_case.test.ts) · [`src/application/usecases/steps/commit/__tests__/detect_potential_problems_use_case.test.ts`](../src/application/usecases/steps/commit/__tests__/detect_potential_problems_use_case.test.ts) · [`src/infrastructure/composition/__tests__/pull_request_use_case_composition_root.test.ts`](../src/infrastructure/composition/__tests__/pull_request_use_case_composition_root.test.ts) · [`src/tooling/__tests__/validate_workflow_contract.test.ts`](../src/tooling/__tests__/validate_workflow_contract.test.ts) · [`src/application/errors/__tests__/bugbot_mutation_error.test.ts`](../src/application/errors/__tests__/bugbot_mutation_error.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/finding_mutation_recovery.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/finding_mutation_recovery.test.ts) · [`src/domain/bugbot/__tests__/finding.test.ts`](../src/domain/bugbot/__tests__/finding.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/finding_identity_replay.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/finding_identity_replay.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/analyze_bugbot_revision_use_case.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/analyze_bugbot_revision_use_case.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/publish_findings_use_case.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/publish_findings_use_case.test.ts) · [`src/application/policies/__tests__/bugbot_resolution_eligibility_policy.test.ts`](../src/application/policies/__tests__/bugbot_resolution_eligibility_policy.test.ts) · [`src/application/usecases/steps/commit/bugbot/__tests__/reopened_dismissal_reconciliation.test.ts`](../src/application/usecases/steps/commit/bugbot/__tests__/reopened_dismissal_reconciliation.test.ts) · [`src/infrastructure/composition/__tests__/bugbot_scm_port_factory.test.ts`](../src/infrastructure/composition/__tests__/bugbot_scm_port_factory.test.ts) · [`src/application/ports/__tests__/bugbot_port_boundaries.test.ts`](../src/application/ports/__tests__/bugbot_port_boundaries.test.ts) · [`src/application/policies/__tests__/bugbot_commit_progress_link_policy.test.ts`](../src/application/policies/__tests__/bugbot_commit_progress_link_policy.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_interrupted_check.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_interrupted_check.test.ts) · [`src/application/policies/__tests__/bugbot_progress_check_observation_policy.test.ts`](../src/application/policies/__tests__/bugbot_progress_check_observation_policy.test.ts) · [`src/data/repository/__tests__/copilot_evidence_repository.test.ts`](../src/data/repository/__tests__/copilot_evidence_repository.test.ts) · [`quality/bugbot/evidence/issue-950/status-card-publication/publisher.test.cjs`](../quality/bugbot/evidence/issue-950/status-card-publication/publisher.test.cjs) · [`quality/bugbot/evidence/issue-950/status-card-publication/packaged-canary.cjs`](../quality/bugbot/evidence/issue-950/status-card-publication/packaged-canary.cjs) · [`src/application/policies/__tests__/bugbot_status_card_publication_policy.test.ts`](../src/application/policies/__tests__/bugbot_status_card_publication_policy.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_workflow.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_workflow.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_lane.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_lane.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_dispatch.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_dispatch.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_observation.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_observation.test.ts) · [`src/infrastructure/github/__tests__/github_bugbot_status_card_handoff.test.ts`](../src/infrastructure/github/__tests__/github_bugbot_status_card_handoff.test.ts) · [`quality/bugbot/evidence/issue-977/installation-state.test.cjs`](../quality/bugbot/evidence/issue-977/installation-state.test.cjs) +- User documentation: [`docs/bugbot/detection.mdx`](../docs/bugbot/detection.mdx) · [`docs/bugbot/finding-publication.mdx`](../docs/bugbot/finding-publication.mdx) · [`docs/bugbot/quality-observability.mdx`](../docs/bugbot/quality-observability.mdx) · [`docs/bugbot/failure-scenarios.mdx`](../docs/bugbot/failure-scenarios.mdx) · [`docs/bugbot/configuration.mdx`](../docs/bugbot/configuration.mdx) · [`docs/bugbot/how-it-works.mdx`](../docs/bugbot/how-it-works.mdx) · [`docs/bugbot/programmatic-api.mdx`](../docs/bugbot/programmatic-api.mdx) · [`docs/pull-requests/workflow-setup.mdx`](../docs/pull-requests/workflow-setup.mdx) · [`docs/issues/comment-commands.mdx`](../docs/issues/comment-commands.mdx) · [`quality/bugbot/evidence/issue-977/README.md`](../quality/bugbot/evidence/issue-977/README.md) ### `execution-lifecycle` — Execution admission, queueing, routing, and result publication diff --git a/specs/bugbot-review-state-reconciliation.md b/specs/bugbot-review-state-reconciliation.md index 338e51651..e1067e50b 100644 --- a/specs/bugbot-review-state-reconciliation.md +++ b/specs/bugbot-review-state-reconciliation.md @@ -2502,3 +2502,32 @@ path forms and one generated-card ownership case. Reuse actual workflow, adapter, Git and packaged entrypoints; no model calls or evaluated-PR writes. Update the operator documentation and catalog evidence, run specification, architecture and focused checks, and report final-head CI separately. + + +### Trusted-default installation evidence — #977, 2026-11-19 + +A review-only writer installation artifact MUST bind the authenticated destination +repository/default/ref SHA and proven before-state, exact producer Action manifest +and bundle, source workflow and proposed workflow SHA-256. A local `./` action +loads the destination checkout; installing its YAML onto an older default does +not install newer writer code. The proposed source pin must select the exact +reviewed executable revision while preserving existing default-ref admission, +self-hosted runner policy, repository/PR serialization, operation correlation, +private-read credentials, native authorization and last verified state. + +Reuse the supported setup review/receipt/drift route coordinated with #814. +Preparing this artifact does not authorize installation, remote lifecycle, a +default merge or a native canary. The eventual installation requires specific +maintainer approval, its exact prepared-commit/manifest receipt, a fresh unchanged +destination, maintainer merge and actual native result on an explicitly authorized +test PR. Record absent, exact bytes, incompatible, stale and inaccessible states +without equating synthetic byte equality with enabled native readiness. No new +consumer default, credential scope or production enforcement is introduced. + +Minimum nine deterministic artifact cases cover authenticated absence, exact +bytes, foreign workflow/repository, moved default, renamed default, inaccessible +and contradictory listings, and the proposed YAML's pin/admission/runner/queue/ +credentials. Supplement with 14 actual packaged fake-provider scenarios including +denied private reads, duplicate/replaced wakeups, stale source and preservation. +These are local controls; installation and native canary acceptance remain open. +Preserve all unsuccessful attempts and run specification/documentation validators. diff --git a/specs/catalog.json b/specs/catalog.json index 328a4386d..ef7f903cd 100644 --- a/specs/catalog.json +++ b/specs/catalog.json @@ -727,7 +727,9 @@ "src/application/policies/bugbot_status_card_publication_policy.ts", "src/infrastructure/github/github_bugbot_status_card_workflow.ts", "src/infrastructure/github/github_bugbot_status_card_dispatch.ts", - "src/infrastructure/github/native_list_pagination.ts" + "src/infrastructure/github/native_list_pagination.ts", + "quality/bugbot/evidence/issue-977/installation-state.cjs", + "quality/bugbot/evidence/issue-977/packaged-canary.cjs" ], "tests": [ "src/domain/bugbot/__tests__/review_state.test.ts", @@ -773,7 +775,8 @@ "src/infrastructure/github/__tests__/github_bugbot_status_card_lane.test.ts", "src/infrastructure/github/__tests__/github_bugbot_status_card_dispatch.test.ts", "src/infrastructure/github/__tests__/github_bugbot_status_card_observation.test.ts", - "src/infrastructure/github/__tests__/github_bugbot_status_card_handoff.test.ts" + "src/infrastructure/github/__tests__/github_bugbot_status_card_handoff.test.ts", + "quality/bugbot/evidence/issue-977/installation-state.test.cjs" ], "documentation": [ "docs/bugbot/detection.mdx", @@ -784,7 +787,8 @@ "docs/bugbot/how-it-works.mdx", "docs/bugbot/programmatic-api.mdx", "docs/pull-requests/workflow-setup.mdx", - "docs/issues/comment-commands.mdx" + "docs/issues/comment-commands.mdx", + "quality/bugbot/evidence/issue-977/README.md" ] }, {