feat(release): per-constituent semantic diff between agent releases - #77
Merged
Conversation
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
Agent releases are immutable, content-addressed bundles - but when an approver signs off on a promotion today, they see the candidate's identity, not what actually changed against the release currently serving the target environment. Answering "what exactly am I approving?" means manually comparing constituents across stores. This adds a first-class semantic diff and puts it in front of the approver.
What changed
utils/release-diff.ts): per-constituent semantic diff - agent config, prompt text (Line-level LCS diff, implemented locally, no new dependency), model id/params, tool list additions/removals, policy config field deltas, and eval-evidence delta including per-dimension score-vector movement. Enumerates every changed constituent with before/after; unchanged constituents are omitted; per-constituent output is truncated at 256KB with an explicit flag; the function never throws.satisfies Record<keyof ...›coverage map makes any future bundle constituent a compile error if the diff doesn't handle it, backed by a runtime missing-key check - a newly added constituent cannot silently escape the diff while still being covered by the release's content hash.-*releaseDiff(releaseIdA, releaseIdB) GraphQL query: read-only, org-scoped (cross-org requests rejected), served by a dedicated Least-privilege Lambda (
GetItemon two tables, nothing else).Testing
diff(a, b)anddiff(b, a)enumerate the same constituents with before/after swapped (this property caught a real structural asymmetry in the tools diff during development).tsc --noEmitclean; full backend suite green (6,548 tests); synth clean for both affected stacks.Deployment notes
Adds one read-only Lambda with a two-table
GetItemrole, plus GraphQL schema additions. Light infrastructure delta; the usual pre-merge branch deploy to dev applies.