feat(agent): add decision snapshot provenance fields - #474
Merged
JSONbored merged 2 commits intoJun 8, 2026
Conversation
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
JSONbored
approved these changes
Jun 8, 2026
JSONbored
left a comment
Owner
There was a problem hiding this comment.
@bittoby this is ready from my side.
A few notes:
- The provenance fields are wired into the existing recommendation snapshot envelope rather than living as a test-only helper.
- Missing/stale evidence fails closed into explicit provenance gaps, which is the right public/private boundary for this surface.
- The tests cover fresh, stale, missing, malformed, and serialization-safety cases.
No code changes requested.
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.
Summary
provenanceto the recommendation snapshot envelope: confidence, freshness, public-safe source identifiers, scoring-model and repo-signal snapshot ids, plus explicit evidence gaps.recommendationEvidenceand the durable context snapshot, so every decision-run and local-branch recommendation path carries provenance without new routes, schema, or storage.evidenceGaps/evidenceComplete, and fail closed (low confidence, unknown freshness, recorded gap) on absent or malformed evidence.Closes #282
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally; global coverage stays at or above 97% for lines, statements, functions, and branches (aim for 98%+ branch coverage locally so CI variance does not fail near the threshold)npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderatenpm run test:cipasses end to end. Coverage fromnpm run test:coverage: statements 99.08%, branches 97.01%, functions 98.5%, lines 99.7% (all ≥ 97%); the changedsrc/services/recommendation-snapshots.tsis 100% statements and 100% branches (41/41, 47/47).npm auditreports 0 vulnerabilities. New tests cover fresh, stale, missing, malformed, and public/private serialization cases.If any required check was skipped, explain why:
npm run test:cigate was run locally and passed.Safety
ui:openapi:checkis clean).UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository. N/A — no visible UI, frontend, docs, or extension changes.UI Evidence
Not applicable — this change has no visible UI, frontend, docs, or extension surface. It adds public-safe provenance metadata to the recommendation snapshot envelope (backend service only).
Notes
attachRecommendationSnapshots(decision runs and local-branch runs inagent-orchestrator.ts), not a test-only helper.recommendationEvidenceremains in the action payload and is never serialized into the public envelope.src/services/recommendation-snapshots.ts,test/unit/recommendation-snapshots.test.ts(+295 / −2).