Conversation
Maintainer-owned hardened port of the valid sensor provenance work originally contributed by Olivier Rossant in PR #364. This reworks the implementation rather than copying it unchanged, adding explicit provenance states, safe rename and history handling, strict verdict parsing, credential-safe bounded diagnostics, contract validation, and regression coverage.
JWThewes
requested review from
eipasteur,
jeromevdl,
leandrodamascena and
svozza
as code owners
September 8, 2026 17:08
Retain explicit known and unknown changed-file provenance in the orchestrator consumer, and add production-shaped regressions for Git-to-stage selection, generic harness failures, changed-file scoping, and diagnostic redaction. Builds on and credits Olivier Rossant's original sensor-harness work in PR #364.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem / Motivation
PR #364 identified a valid v2 defect: sensor harness failures could be reported as code-quality failures, while incomplete changed-file provenance could either suppress required sensors or inspect the wrong projects. The submitted branch was not safe to merge because it double-prefixed multi-repository paths, lost rename sources, treated unknown provenance as an empty known list, and accepted malformed successful sensor output.
This is a maintainer-owned replacement, rebuilt on current
mainrather than merging the original head.Why it matters
Incorrect provenance can make blocking sensors fail open or hold unrelated stages. Unbounded or unredacted harness diagnostics can also persist credentials and create avoidable performance and UI risks.
What changed
Provenance and selection design
knownorunknown, including the reason for unknown state.commitAndPushAll→runStage→ sensor selection and through orchestrator feedback persistence.changedFiles: nullpluschangedFileProvenance: { state: "unknown", reason }; unknown is never encoded or reported as[]/none.Security and contract design
verdictMode,scope, and safe relativeprojectConfigvalues.INCONCLUSIVE, neverPASS.Bounded diagnostics
Production-shaped seam coverage
The replacement now exercises the real orchestration seam rather than only helper functions:
commitAndPushAll→runStage→ sensor selection preserves both endpoints of a cross-repository rename, scopes the affected project files correctly, and rejects double-prefixing.127/ tool unavailable becomes blockingINCONCLUSIVE, holds the stage, retains two changed files, and redacts both secrets before persistence and broadcast.1with captured stderr) becomes blockingINCONCLUSIVE, holds the stage, retains the changed-file scope, and persists only redacted stderr.unknownprovenance with its reason, widens inspection to all applicable files, and cannot be collapsed to an empty known list.0with invalid stdout JSON remains boundedINCONCLUSIVE, neverPASS.Attribution
The original valid sensor-provenance direction was contributed by Olivier Rossant in PR #364. This replacement preserves that credit while reworking the implementation to address the correctness, security, provenance, and performance gaps found during review.
Validation
Baseline SHA:
671502e5da02a2fe182d3043462ed75d17c7d564Current head SHA:
93760487ead209376dbe93089ba6142222cdb33fValidated with repository-pinned Node
v22.22.1and Vitest4.1.10(frontend Vitest4.1.9):Focused remediation suites
127, generic exit1with stderr, invalid successful JSON, changed-file scoping, stage hold behavior, and pre-persistence/pre-broadcast credential redaction.Affected regressions
Final quality gates
Local hook and container-runtime evidence
sha256:03ec8be4211f2c0980329c3954e3b17c3c3089be23ab74bd202672f13cc6126c).Could not find a working container runtime strategy.npx vitest run --changed --passWithNoTests, is environmentally blocked and is not claimed green because the root Vitest setup unconditionally starts Gremlin and DynamoDB Local containers.Residual risks
qsadvisory; the configured high-severity threshold passed, and the frontend audit reported 0 vulnerabilities.Supersedes #364
no linked issue: this PR replaces an existing pull request rather than resolving a separately tracked issue.