Repository navigation
feat(setup): authenticate independent publisher inventory reviews - #1007
efraespada wants to merge 24 commits into
Conversation
…o-publisher-setup: authenticate independent publisher inventory reviews
|
To preview the documentation for this pull request, visit the following URL:
|
Copilot approval · Human review neededStatus: A protected workflow, policy, or trust-boundary file changed. Technical evidenceRevision: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1007 +/- ##
===========================================
+ Coverage 95.25% 95.79% +0.54%
===========================================
Files 1172 1594 +422
Lines 39236 51708 +12472
Branches 11685 16217 +4532
===========================================
+ Hits 37373 49536 +12163
- Misses 698 784 +86
- Partials 1165 1388 +223
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 6 potential problems when commit 66fc872 was analyzed. This snapshot is historical; use the status block above for current state. 6 findings are linked to changed code.
Findings
- medium: Treats a supported
$/actionreference as unresolved —src/infrastructure/__tests__/setup_publisher_inventory_review_adapter.test.ts:549 - medium: The preparing automation is not excluded from approval —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:138 - medium: A machine user can satisfy the independent-review gate —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:126 - medium: Indirect code generation bypasses Node closure checks —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:457 - low: Rejects valid workflow job IDs containing underscores —
src/application/policies/setup_publisher_inventory_review_policy.ts:109 - low: The documented variable read scope is narrower than the implementation —
docs/development/architecture.mdx:692
Bugbot: 1 finding needs attention
FindingsPull request · Verified commit · Current review checks · Workflow run Implementation progress and pending work · |
…o-publisher-setup: close publisher review authority and source gaps
…o-publisher-setup: allow durable journal I/O in four recovery cases Native ae3 CI retained two C58 default5-second timeouts. The unchanged observer records a completed4,977ms sync and another still pending after5,152ms; the underlying filesystem/resource cause remains unknown. Give only the four existing retained-effect/recovery cases the established20-second integration allowance for their two real journal traversals and cleanup. Case inputs and callback assertions are byte-identical. No product code, global deadline, qualification policy or coverage threshold changes. The original four cases pass locally; the complete adjusted82-case file passes without skips. This does not claim a native corrected pass. Retain original negative evidence and update the owning SDD and catalog. Refs #1006, #977, #950.
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 2 potential problems when commit ae3e240 was analyzed. This snapshot is historical; use the status block above for current state. 2 findings are linked to changed code.
Findings
- high: Unbound shell positional parameters can execute omitted code —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:702 - medium: Rejects producer workflows with unguarded non-writer jobs —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:819
…o-publisher-setup: bind actual shell program selection
…o-publisher-setup: retain actual shell callee provenance
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 3 potential problems when commit 2ebd4e6 was analyzed. This snapshot is historical; use the status block above for current state. 3 findings are linked to changed code.
Findings
- medium: Unmodeled default shells can hide secret use —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:586 - low: Overfull-page cases reject for duplicate records —
src/infrastructure/__tests__/setup_publisher_inventory_review_adapter.test.ts:971 - low: Case-folded uniqueness rejects distinct workflow paths —
src/application/policies/setup_publisher_inventory_review_policy.ts:240
…o-publisher-setup: bind effective publisher execution context
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 3 potential problems when commit b0eadb4 was analyzed. This snapshot is historical; use the status block above for current state. 3 findings are linked to changed code.
Findings
- medium: Reject unbound dynamic runner selectors —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:689 - low: Over-limit array cases fail before checking collection limits —
src/application/policies/__tests__/setup_publisher_inventory_review_policy.test.ts:211 - low: Provider read failures are reported as snapshot drift —
src/infrastructure/setup_installation_github_delivery_adapter.ts:153
…o-publisher-setup: close publisher source and recovery review findings
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 1 potential problem when commit 693880c was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.
Findings
- high: Secret-controlled continue-on-error bypasses closure checks —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:740
…o-publisher-setup: close publisher startup and workflow controls
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 5 potential problems when commit 73c2318 was analyzed. This snapshot is historical; use the status block above for current state. 5 findings are linked to changed code.
Findings
- high: Case-variant checkout references bypass workspace tracking —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:771 - medium: Canonical document bytes are not fully specified —
specs/setup-bugbot-publisher-manifest-route.md:448 - medium: A service account can satisfy the independent human review gate —
src/application/policies/setup_publisher_inventory_review_policy.ts:367 - low: Composite input test rejects before reaching the Node input check —
src/infrastructure/__tests__/setup_publisher_inventory_review_adapter.test.ts:1583 - low: Risk-control totals do not reconcile —
specs/organization-configuration-reuse-and-batch-setup.md:2284
…o-publisher-setup: bind publisher review attestations and checkout identity
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 4 potential problems when commit a37cabf was analyzed. This snapshot is historical; use the status block above for current state. 4 findings are linked to changed code.
Findings
- high: Case-variant checkout paths can execute a different source on Windows —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:895 - medium: A service User can self-assert the required human review —
src/application/policies/setup_publisher_inventory_review_policy.ts:325 - medium: Review approvals still accept the v1 statement —
specs/setup-bugbot-publisher-manifest-route.md:458 - medium: Require checkout-safe spelling for imported JSON data —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:1014
…o-publisher-setup: require trusted human eligibility and portable source bindings
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 1 potential problem when commit d2c381c was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.
Findings
- low: Inert
varstext activates the Variables gate —src/infrastructure/setup_publisher_inventory_review_adapter.ts:1107
…o-publisher-setup: derive publisher Variables reads from execution dependencies
…o-publisher-setup: bind publisher inventory to materialized source boundaries
…o-publisher-setup: isolate persisted fixtures and malformed input cases
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 2 potential problems when commit d1310da was analyzed. This snapshot is historical; use the status block above for current state. 2 findings are linked to changed code.
Findings
- medium: Bound expanded workflow call traversal —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:903 - low: Preload test rejects its entrypoint independently of NODE_OPTIONS —
src/infrastructure/__tests__/setup_publisher_inventory_review_adapter.test.ts:2248
…o-publisher-setup: bound repeated inventory source expansion
…o-publisher-setup: settle transaction fixtures before cleanup
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 1 potential problem when commit 50268a2 was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.
Findings
- medium: Aliased status writers evade the producer conflict check —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:1199
…o-publisher-setup: reject unproved status writer references
There was a problem hiding this comment.
Current status: 1 finding originating in this review requires attention.
Last reconciled on5a7648c. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 1 potential problem when commit 5a7648c was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.
Findings
- medium: Constructed status markers bypass writer detection —
src/infrastructure/setup_publisher_inventory_review_adapter.ts:1199
| reached.add(id); pending.push(...document.edges.filter(e => e.from === id).map(e => e.to)); | ||
| } | ||
| const content = [...reached].map(id => sources.get(id)!.content).join('\n'); | ||
| const writerReference = /copilot:bugbot[-:]|bugbot-status-card|COPILOT_BUGBOT_STATUS_CARD/u.test(content) ? (/\bissues\s*\.\s*(?:createComment|updateComment)\s*\(/u.test(content) ? 'known' : this.statusWriterReference(reached, sources, document, consumeWork)) : 'none'; |
There was a problem hiding this comment.
Constructed status markers bypass writer detection
Severity: medium
Category: security · Confidence: 94%
Location: src/infrastructure/setup_publisher_inventory_review_adapter.ts:1199
The status-writer AST scan runs only when the source contains one of the marker strings contiguously. For example, client.issues.updateComment({ body: '<!-- copilot:' + 'bugbot-status -->' }); constructs the exact status marker at runtime, but none of the prefilter alternatives match the source text, so writerReference becomes none and statusWriterReference is never called. A non-producer disposition then bypasses producer-lane checks and can be accepted as an independently reviewed inventory; the downstream workflow classifier can consequently report the repository as absent and permit installation alongside the existing writer. This violates the requirement that direct status-card writers remain blocking regardless of approval.
Evidence:
At line 1199 the raw-text marker test gates both direct-call detection and the AST scan. With the concatenated literal above, the resulting value is <!-- copilot:bugbot-status -->, but the source contains neither copilot:bugbot nor bugbot-status-card nor COPILOT_BUGBOT_STATUS_CARD. The resulting none avoids the non-producer rejection at line 1200; line 1203 skips lane validation for that disposition, and the reviewed workflow set can be classified as absent.
Suggested fix:
Do not skip writer analysis based on raw marker presence. Analyze candidate writer calls and their bounded, statically resolvable body values; only treat a writer as unrelated when its body is proven not to contain the status marker.
Current head 5a7648c is NOT merge-admitted. All four original workflows completed and all seven physical job originals are retained and byte/hash verified. Build, static checks, Commit and Branch Sync pass. Native CI is negative: 972 suites pass / 2 fail; 21,100 tests pass / 2 fail / 35 historical skips. Both failures reached the 5,000 ms test deadline: C02 observed-PR retention after a failed save, and the verifier adapter's structured same-session order proof. No native rerun has been requested and no production limit changed.
Whole Review completed 24/24 partitions, one frame, one candidate and one published finding, zero overflow. New comment 4732690562 remains unresolved: raw marker presence still gates writer analysis and does not account for constructed body values. Its causal controls and correction are pending. All 43 threads / 86 comments are completely paginated privately. Prior C65 is published, replied and resolved; existing local/package passes remain valid evidence of their own scope, not native acceptance. No sensitive program examples are reproduced here.
Current deterministic evidence: 974 suites / 21,102 passing local tests; clean 660 registered controls; actual package 313 controlled CLI calls / 16,107 GETs / zero effects, with exact Git binding. Production disabled; no qualified profile; publisher not installed; paired 42 not admitted; real platform observations 0/6; evaluated pilot writes zero.
Prior native-managed description preserved in full
Current published head: 5a7648c. Both the owned transaction-fixture cleanup correction and C65 status-writer reference correction are published. C65: original production 9 pass / 8 unintended admissions; fixed 17/17; related complete suites 1,022/1,022. Current packaged CLI: 313 actual controlled invocations, 16,107 GETs, zero provider/local effects, unregistered routes or model calls. Separate byte-identical C65 input comparison: old package accepts; corrected package rejects before approval authority. Tar SHA256 e0628517e024e598f81f7ad6b9f1d0ddb8fcfe9ed62e7133390bd964db15f253.
Normal unmodified commit hooks: 974 suites / 21102 passing tests / 35 historical skips. Clean registered controls: 660/660. Exact Git binding verifies all 104 package files and executable modes, four generated programs and 44 guarded inputs. Current native CI/Commit/whole Review are pending; no merge acceptance is claimed. The previous source's native negative and complete Review original remain retained. Documented floor: 829 risk rows / 65 semantic cases. Production disabled, publisher not installed, no qualified profile, paired 42 not admitted and evaluated pilots at zero write attempts.
Prior native-managed PR description preserved in full
Current published head: 50268a2. Complete native Review finished 23/23 parts and published one additional finding: an indirect status-writer reference could evade the non-producer conflict guard. All seven native originals and all 42 threads / 84 comments are retained privately. The new thread remains unresolved until its correction is published. Earlier d131 findings are resolved. The published head's native CI remains negative; no native rerun has been requested.
The local C65 correction uses the existing parser on bound Node entries/imports, preserves known direct conflicts and leaves unproved writer references unresolved for non-producer claims. Inert labels and declarations alone are not treated as writer proof. It preserves the shared work envelope, source/review bindings, genuine personal eligibility and every serialized-producer lane check; it adds no dependency, user flag, privilege or inspected-program execution.
Original production wrongly accepted eight of the final 17 frozen cases; nine controls preserve their expected outcome. The correction passes all 17 and both complete related suites (1,022 passed, zero failures/skips). Seventeen separately owned Node fixture programs confirm the modeled port calls with zero actual provider or model requests. Source and operator documentation, catalog generation, Graphify and all five static checks pass. The current minimum is 829 risk rows / 65 semantic cases; package execution and final-source native acceptance remain pending.
The native transaction-fixture failure has a separate local normal commit ae5e4c4: all 974 suites and 21,085 tests pass (35 historical skips), all 660 clean-source controls pass, and the nine historical transaction assertions are preserved. That commit is not yet pushed. The C65 production correction requires its own rebuilt package and all 313 controlled CLI invocations; earlier 312 package results are retained historical evidence, not a current-source substitute.
This PR does not prove installation or Bugbot qualification. The real producer-program profile, effective protected default policy, genuine independent inventory review and verified native installation remain separate work. The original 174-case result remains COMPLETE_NEGATIVE; the paired 42 are not admitted. Production verification stays disabled and pilot write attempts stay zero.
Current complete history and four-front index: #950 (comment)
Historical full body through update 207: https://github.com/vypdev/copilot/blob/50268a20dbceed0b4414bc03644691508965eccc/quality/bugbot/evidence/issue-1006/canonical-history-through-207.md
Closes #1006.
Previous validation snapshot and native managed content retained
Current validation status for published source 50268a2: native Build/package, Static, Branch Sync and Commit have passed. The complete native CI is negative: 973 suites passed, one failed; 21,075 tests passed, 35 historical skips, and nine failures in the unchanged permission-transaction suite after its first test exceeded the implicit five-second deadline. Native Review remains in progress. The two d131 findings below have evidence replies and are resolved; this PR is not merged.
A local follow-up now owns and settles each pending fixture inspection before retiring its captured directory and gives this disk-backed suite an explicit 30-second case/hook deadline. A held real-adapter journal barrier reproduces the premature original retirement and subsequent owner exclusion. The frozen causal case fails under the original order and the corrected complete suite passes all 10 cases. The nine historical cases preserve their arguments and assertions. Types and lint pass. The initial native scheduling delay itself remains unproved. This test-only follow-up is not yet committed or published; it changes no generated program or production limit. Its additional fixture-maintenance control is separate from the 811 risk-row / 64 semantic-case product floor. No native rerun has been requested.
All 660 registered controls passed on the clean published commit. The 312 packaged controls and all 104 package files remain bound to that source; the new local test fixture does not change the 44 guarded publisher inputs.
Adds a source-bound independent review gate for the publisher's producer inventory. An installation candidate must bind its evidence to authenticated source and obtain an eligible independent human review under the protected reviewer policy. Incomplete or unsupported source remains unresolved.
The reader follows reusable workflows, composite actions, Node entry/import phases, shell traversal and Variable-dependent witnesses without executing producer programs. This revision also fixes both findings from the complete review of d131: repeated expansion now shares one internal 2,048-visit / 100,000,000-byte envelope across the entire target inspection, and the preload control uses an otherwise accepted entry with an independent positive control. It adds no operator override and does not cache context-dependent compatibility verdicts.
Validation on 50268a2:
Both published d131 findings have evidence replies and are resolved. Their workflow's original Project HTTP504 and single successful operational recovery remain in the history; neither is erased or replayed.
This PR does not establish an installed publisher or a qualified Bugbot profile. The real producer-program profile, effective default-branch human-review policy, genuine independent inventory approval and verified installation remain separate acceptance work. The original 174-case campaign remains COMPLETE_NEGATIVE; the paired 42 are not admitted. Verification remains disabled and pilot write attempts remain zero.
Evidence: https://github.com/vypdev/copilot/blob/50268a20dbceed0b4414bc03644691508965eccc/quality/bugbot/evidence/issue-1006/expanded-source-work-budget.json
Complete canonical history through update 207: https://github.com/vypdev/copilot/blob/50268a20dbceed0b4414bc03644691508965eccc/quality/bugbot/evidence/issue-1006/canonical-history-through-207.md
Current four-front index: #950 (comment)
Closes #1006.