feat(evidence): make connector truncation explicit#11
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9469811ad6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| with: | ||
| node-version: "20" | ||
| - name: Test connector source artifact contract | ||
| run: node scripts/source-artifact.test.mjs |
There was a problem hiding this comment.
Gate Pages deploy on source capture validation
For pushes to main that change packs/**, this Pages gate still only runs the unit test plus validate-pack; validatePackData does not inspect event.sources, while the new CLI that rejects truncated connector captures is scripts/validate-source-artifacts.mjs. Since the deploy job depends only on this workflow's validate job, an invalid connector capture can still be published to Pages even if the separate source-artifacts workflow fails, so add node scripts/validate-source-artifacts.mjs here or make validate-pack call it before deploy.
Useful? React with 👍 / 👎.
What changed
validateSourceCapturefor connector-derived evidencetruncated: true|falsesource-artifactsCI workflowadd-match-day.mjsin memory before any pack file is writtenWhy
A connector response may be only a preview. Treating a silently truncated payload as complete evidence can publish an incorrect scoreline or causal claim. This PR makes completeness explicit while preserving deterministic ingest and all existing direct URL citations.
Compatibility
type,citation, andurlremain validcaptureevents.json; the pack retains only provenance metadataValidation
node scripts/source-artifact.test.mjsnode scripts/validate-source-artifacts.mjssource-artifactsGitHub Actions workflow: passingThe first CI run exposed an unrelated pre-existing causal-quality failure when the existing workflow was retriggered. The implementation was separated into its own gate rather than weakening or bypassing the semantic validator.