| service | codecommit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sdk_module | aws-sdk-go-v2/service/codecommit@v1.43.3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| last_audit_commit | 6c5c49416 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| last_audit_date | 2026-10-10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| overall | A | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ops |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| families |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| gaps | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| items_still_open | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| structural_gaps |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| deferred | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leaks |
|
Fixed: ExistingRuleContentSha256 precondition on UpdateApprovalRuleTemplateContent/UpdatePullRequestApprovalRuleContent
(template sha also stale after update); MergePullRequestBy* now create commits, move the destination branch, and set
PullRequestTarget.MergeMetadata; targets carry real sourceCommit/destinationCommit/mergeBase; baseCommitId from a
commit-DAG merge base on GetMergeOptions/GetMergeCommit/GetMergeConflicts/BatchDescribeMergeConflicts, which now
resolve specifiers instead of echoing them. Tests: realclient_pr_merge_and_rule_sha_test.go.
Checked all 55 required output members across 29 ops. Found and fixed
DeleteApprovalRuleTemplate/DeletePullRequestApprovalRule omitting their
required approvalRuleTemplateId/approvalRuleId key entirely on the real-AWS
idempotent-already-deleted path (empty ID) -- a required member must be present
even when empty, not omitted. errors_deserializer_test.go's existing
TestDeleteApprovalRuleTemplate_UnknownNameIsIdempotentSDKRoundTrip/
TestDeletePullRequestApprovalRule_UnknownRuleIsIdempotentSDKRoundTrip had
codified the old (wrong) nil-ID expectation; updated both to assert a present,
empty ID instead, hand-reverted/confirmed-failing/restored against the fix.
GetMergeOptions.BaseCommitId (required, never populated) recorded in
items_still_open -- same no-merge-base-algorithm root cause as the
already-documented GetMergeCommit.BaseCommitId gap.
2026-09-12 (errcodeaudit fifth pass, gopherstack-r3pr): fabricated InvalidParameterException -> real CommitRequiredException
The mapper's final ErrValidation entry (handler.go's errCodeLookup) emitted
InvalidParameterException, a name absent from codecommit@v1.36.4's SDK
module entirely (189 exception types, grepped, no match). Its only raise
site is resolveCommitSpecifier's empty-specifier check (merges.go),
reached by GetMergeCommit and MergeBranchesBy{Squash,ThreeWay,FastForward}.
All four operations' own deserializeOpError switches declare
CommitRequiredException — confirmed by reading each one directly in
deserializers.go, not inferred from the family. Renamed the sentinel
ErrValidation -> ErrCommitSpecifierRequired (it had exactly one use, so
no ripple) and changed the mapped code to CommitRequiredException.
New test TestMergeOps_EmptyCommitSpecifier_CommitRequiredException
(orphan_code_sentinel_fixes_test.go), table-driven across the four affected
ops, drives the real SDK client and asserts errors.As(err, &types.CommitRequiredException{}) — fails against the pre-fix code, where
none of the four ops' deserializers match "InvalidParameterException" to any
case, so the real client only ever got an untyped smithy.GenericAPIError.
Added realclient_repository_pull_request_and_approval_test.go: 11 tests, each building a real
codecommit SDK client against Handler and round-tripping every
previously-untyped op -- Repository (BatchGetRepositories/UpdateName/
UpdateDescription/Tag/Untag/ListTagsForResource), Branches+Commits
(ListBranches/UpdateDefaultBranch/BatchGetCommits), Files+Blob (GetFile/
GetFolder/GetBlob), merges (GetMergeOptions/GetMergeCommit/
MergeBranchesByFastForward), pull requests (Get/UpdateTitle/UpdateDescription/
GetPullRequestApprovalStates/UpdatePullRequestApprovalState/
GetPullRequestOverrideState/OverridePullRequestApprovalRules/
ListPullRequests/MergePullRequestBy{Squash,ThreeWay,FastForward}), approval
rule templates (Get/List/Update{Content,Description,Name}/(Dis)Associate*/
Batch(Dis)Associate*/ListAssociated*/ListRepositoriesFor*), repository
triggers (Put/Get/TestRepositoryTriggers), and comment reactions
(Put/GetCommentReactions). codecommit typed coverage: 38/79 -> 79/79.
Two real bugs found and fixed:
handleGetCommentReactions(handler_reactions.go) emitted a flat{emoji, userArn}object per stored reaction, but the real wire shape (codecommit@v1.36.4types.ReactionForComment) nests aReactionValueFormatsobject underreactionand the reacting users' ARNs underreactionUsers-- there is no flat member at all. A typed client decoding the old shape always saw a nilReactionand emptyReactionUsersregardless of what was stored. Fixed by grouping stored reactions by emoji into the real nested shape (reactionsForCommentJSON). This also exposed thatPutCommentReactionnever recorded a reacting user at all (PutCommentReactionInputhas no client-supplied ARN member, same as the already-fixedOverridePullRequestApprovalRules) -- fixed by threadingawsmeta.CallerArn(ctx)through the same ctx-special-case dispatch mechanismhandleOverridePullRequestApprovalRulesalready uses (dispatch()in handler.go), soPutCommentReaction's backend signature is now(commentID, emoji, userARN string)and is idempotent per(commentID, emoji, userARN).ShortCode/UnicodeonReactionValueFormatsremain unset -- this backend never resolves a rawreactionValueinto those two alternate representations, a documented gap rather than a fabrication.handleGetMergeCommit(handler_merges.go) echoed the rawsourceCommitSpecifier/destinationCommitSpecifierrequest strings back assourceCommitId/destinationCommitId, but realGetMergeCommitOutputdocuments both as "the commit ID ... used in the merge evaluation" -- since a specifier can be a branch name (this package's ownresolveCommitSpecifieralready accepts one), the response could hand a typed client a branch name where it expected a real commit ID. Fixed by resolving both specifiers via a new exportedResolveCommitSpecifier(wraps the existing unexported, already-lockedresolveCommitSpecifier) before echoing them, and by validating them as a side effect -- an unresolvable specifier now correctly 404s instead of silently succeeding.baseCommitId(also a requiredGetMergeCommitOutputmember) remains absent: this backend has no real merge-base algorithm to compute it honestly, left as a documented gap rather than fabricated. One existing raw-body test (TestHandler_GetMergeCommit) used fabricated, unresolvable specifiers ("abc"/"def") and asserted success; updated to use the repository's real"main"branch, matching the now-correct validation.
go build ./..., go vet ./... clean repo-wide. go test -race -count=1 ./services/codecommit/... and ./pkgs/persistence/... pass. golangci-lint run --new-from-rev=HEAD services/codecommit/... 0 issues. No persistence
schema/version change (Reaction already persists via the generic
store.Table machinery; UserARN was already a modeled field, just never
populated). go run ./cmd/paritylint stays at 0 FAIL.
-
The entire
Commentfamily (8 ops) returned an undecodable body to any typed client.models.gotypedComment.CreationDate/LastModifiedDateasstring, filled withtime.Now().UTC().Format(time.RFC3339)(comments.go) and emitted verbatim by the sharedcommentToMapconverter (handler_comments.go). The real deserializer (codecommit@v1.36.4 deserializers.go:20415,20430, insideawsAwsjson11_deserializeDocumentComment) requires a JSON number —smithytime.ParseEpochSeconds— and falls through toexpected CreationDate/LastModifiedDate to be a JSON Number, got string insteadon anything else. Status 200, body no SDK client could read. AffectsPostCommentForComparedCommit,PostCommentForPullRequest,PostCommentReply,GetComment,GetCommentsForComparedCommit,GetCommentsForPullRequest,UpdateComment(the 7 ops the bug report named), plusDeleteCommentContent(an 8th — samecommentToMapcall path, found while auditing the rest of the family; itsDeleteCommentContentOutput.Commentshape is identical). This service already got the pattern right elsewhere:Repository,PullRequest, andApprovalRuleTemplateall storetime.Timeand convert with.Unix()at the wire boundary (handler_repositories.go,handler_pull_requests.go,handler_approval_rules.go); onlyCommentwas missed. Fixed by matching that exact pattern rather than inventing a new one:Comment.CreationDate/LastModifiedDateare nowtime.Time,comments.gosets them withtime.Now().UTC()(no.Format), andcommentToMapemits.Unix().Commentis persisted through a DTO (commentSnapshotinpersistence.go, not the live struct — see "Traps for the next auditor" below), so this is not a wire-format-only change:commentSnapshot's ownCreationDate/LastModifiedDatewere changed totime.Timetoo, to keeptoCommentSnapshot/fromCommentSnapshota straight field copy.encoding/jsonalready renderstime.Timeas a quoted RFC3339-ish string — the exact shape these fields already held on disk — so an existing on-disk snapshot still decodes;codecommitSnapshotVersiondid not need to bump. Verified live: reverted the fix, rebuilt the container image, and drove all 8 ops through the realaws-sdk-go-v2client — every one failed withdeserialization failed ... expected CreationDate to be a JSON Number, got string instead(orLastModifiedDate, depending which field decoded first); reapplied the fix and the same 8 calls passed with real decoded timestamps (test/integration/codecommit_test.go,TestIntegration_CodeCommit_CommentFamily). -
GetCommentsForComparedCommit/GetCommentsForPullRequestemitted the wrong response shape entirely — a flat[]Commentinstead of the real nested wrapper. The real shape (verified againstcodecommit@v1.36.4 deserializers.go:20763/20883,awsAwsjson11_deserializeDocumentCommentsForComparedCommit/...CommentsForPullRequest) is[]types.CommentsForComparedCommit/[]types.CommentsForPullRequest: each element wraps a nestedcommentsarray plusrepositoryName/afterCommitId/beforeCommitId(and optionalafterBlobId/beforeBlobId/location, not tracked by this backend). This emulator's handlers instead put the flat, unwrappedCommentobjects directly undercommentsForComparedCommitData/commentsForPullRequestData. Unlike bug 1, this does not produce a decode error — the JSON-RPC protocol silently drops unrecognized top-level keys, so a real client's array element decodes successfully as aCommentsForComparedCommit/CommentsForPullRequestwith every field at its zero value, includingComments: nil. Every comment posted through this backend was therefore silently unreachable through either list op — worse than a hard failure, since nothing in a raw-body or status-code check (or even a naiveerr == niltyped-client check) would catch it. Fixed: both handlers now group all matching comments into a single wrapper object (this backend has no per-location grouping, and each query is already scoped to one repository/commit or one pull request, so one group is the correct AWS-shaped answer here) withrepositoryName/afterCommitId(compared-commit) orpullRequestId(pull-request, backed by the stored comment's ownRepoNameforrepositoryNamewhen available) always set,beforeCommitIdset when the caller provided it, and the real comments nested undercomments. Verified live the same way as bug 1: with the timestamp fix in place but this fix reverted,TestIntegration_CodeCommit_CommentFamily/get_comments_for_compared_commitand.../get_comments_for_pull_requestfailed on content, not onerr:group.RepositoryName/group.AfterCommitIddecoded as""andgroup.Commentsas[]("[]" should have 1 item(s), but has 0) even though the call itself returned no error — exactly the silent-data-loss signature described above. -
Two smaller, related findings, left as documented gaps rather than fixed this pass (both since fixed: comments store before/after commit IDs and location) (out of scope for a decode-correctness bug fix — both are shape completeness, not shape correctness):
PostCommentForComparedCommitparsesbeforeCommitIdfrom the request but the backend method signature discards it (comments.go'sPostCommentForComparedCommit(repoName, _, afterCommitID, content string));PostCommentForPullRequestsimilarly never storesafterCommitId/beforeCommitIdper-comment. Both Post* handlers now echo the caller-supplied values back in their top-levelafterCommitId/beforeCommitIdresponse fields (real, optional members ofPostCommentForComparedCommitOutput/PostCommentForPullRequestOutputthat were previously omitted entirely), which is honest for the just-posted response but meansGetCommentsForPullRequest's wrapper (bug 2's fix) cannot populateafterCommitId/beforeCommitIdon later reads — the backend has nowhere to read them back from. Also unaddressed:Comment's real wire shape additionally carriesclientRequestToken,callerReactions, andreactionCounts(deserializers.go:20362case list), none of which this backend threads through —reactionCountswould needcommentToMapto gain backend access (reactions are tracked separately inInMemoryBackend.commentReactions);callerReactionspresupposes a caller identity concept this backend doesn't model. All are optional pointer/map fields in the real shape, so their absence doesn't break decode the way bugs 1–2 did.
Protocol: awsjson1.1, single POST endpoint, X-Amz-Target: CodeCommit_20150413.<Op>.
-
MergeBranchesBySquash/MergeBranchesByThreeWayliterally called theMergeBranchesByFastForwardbackend method (handler_merges.go) — the response looked plausible (a fresh commit ID + branch update) but there was zero distinction between the three merge strategies at the object level, let alone the content level. Fixed by giving each its own real backend method (merges.go): both now resolve and validate theirsourceCommitSpecifier/destinationCommitSpecifier(newresolveCommitSpecifierhelper — tries a branch name first, then a full commit ID,CommitDoesNotExistExceptionif neither resolves; previously no validation existed, so a nonexistent branch/commit silently "succeeded"), and produce the correct parent-count shape verified againstaws-sdk-go-v2/service/codecommit@v1.33.10's generatedMergeBranchesBySquashInput/MergeBranchesByThreeWayInput: squash creates a commit with exactly one parent (the destination tip — squash discards source history), three-way creates a commit with two parents ([destination, source], standard merge-commit shape). Both now also honorTargetBranch/CommitMessage/AuthorName/Emailrequest fields (real, wire-verified members of both inputs) that were previously parsed by neither handler and silently dropped — a field-drop bug of the same class flagged in the audit brief. Content-level squash/3-way merging (actually combining file changes) remains unimplemented — see gaps; the root cause (flat, non-branch-scopedFilestorage) is unchanged. -
GetMergeConflictshad an inverted boolean —mergeablewas hardcodedfalse. This is the sharpest finding of the pass: this backend has no content-diff engine and never computes a real conflict, so every merge this emulator could ever be asked about is, in fact, mergeable — but the handler unconditionally returnedmergeable: false. A real client that pollsGetMergeConflictsbefore attempting a merge (a documented, common pattern) would have concluded every merge was blocked and never proceeded, against a backend that would have happily merged in every case. Fixed: now returnstrue. Also fixed:sourceCommitId/destinationCommitIdin the response echoed the raw request specifier string instead of a resolved commit ID (wrong perGetMergeConflictsOutput's doc: "the commit ID ... used in the merge evaluation"), and the op performed zero input validation —repositoryName/sourceCommitSpecifier/destinationCommitSpecifier/mergeOptionare all"This member is required"per the real SDK'svalidateOpGetMergeConflictsInput, none were checked. Both fixed using the sameresolveCommitSpecifierhelper and validation pattern asBatchDescribeMergeConflicts's existing (correct) handler. -
SameFileContentException/ErrSameFileContentwas declared and wired intoerrCodeLookupbut no backend path ever returned it (flagged as a gap by the 2026-07-23 pass). Fixed for the buildable half:PutFileandCreateCommit'sputFilesentries now compare new content against the existing blob at that path (bytes.Equal) and reject an identical write before mutating any state, matching AWS's documented behavior ("the content of the file you're trying to add is exactly the same as the content of that file ... you specified as the parent commit"). This surfaced and required fixing two existing unit tests (TestHandler_ListFileCommitHistory_Pagination/_TableDriven) that had been writing byte-identical content across multiple commits to build history — itself a real client-unrepresentative test pattern (a real AWS client doing this would already getSameFileContentException), now writes distinct content per commit.FilePathConflictsWithSubmodulePathExceptionremains unreturned — no submodule concept exists in this backend to build a conflict check on top of (see gaps).
Protocol: awsjson1.1, single POST endpoint, X-Amz-Target: CodeCommit_20150413.<Op>.
RouteMatcher checks the header prefix only (no body sniffing needed since it's a single
endpoint) — verified every op in GetSupportedOperations() has a buildOps() entry and
vice versa via sdk_completeness_test.go.
-
DescribeMergeConflictswas a disguised no-op (handler_ops.go,handleDescribeMergeConflicts). It unmarshaled the request and echoeddestinationCommitSpecifier/sourceCommitSpecifier/filePathstraight back into the response with hardcodedmergeHunks: []andnumberOfConflicts: 0— it never called into the backend, never validated required fields, and never checked the repository existed (a request against a nonexistent repository returned 200 OK). Its siblingBatchDescribeMergeConflictsdid all of this correctly. Fixed by validating the same required fields (mirroring the batch handler) and delegating toBackend.BatchDescribeMergeConflictswith a single-elementfilePaths, translating the first (only) conflict entry into the single-file response shape. -
PutFile/DeleteFile/CreateCommitresponses hardcodedblobId: ""even though the backend generates and stores a real blob ID for every file write (backend.go'sapplyFileChanges,backend_ops.go'sPutFile). AWS'sPutFileOutput.BlobId,DeleteFileOutput.BlobId, andCreateCommitOutput.filesAdded[].blobIdare all required response fields (verified againstaws-sdk-go-v2/service/codecommit@v1.33.10's generated types) — a client that callsPutFilethen immediatelyGetBlob(blobId)(a common pattern to verify what was written) would getBlobIdDoesNotExistExceptionagainst this emulator before this fix.PutFile/DeleteFile/CreateCommit/applyFileChangesnow all return the real blob ID(s) they generate, and the handlers thread them into the response. -
DeleteFilenever checked the file existed. Deleting a path that was never added silently fabricated a "delete" commit and updated the branch tip, instead of returning AWS'sFileDoesNotExistException. Fixed:DeleteFilenow looks up the file first and returnsErrFileNotFoundif absent (also lets it recover the real blob ID for the response — see #2). -
Six "not found" error paths returned the wrong AWS exception type.
GetFile,GetBlob, all 6 comment ops (GetComment,GetCommentReactions,PostCommentReply,PutCommentReaction,UpdateComment,DeleteCommentContent), and the 2 PR-approval-rule ops (DeletePullRequestApprovalRule,UpdatePullRequestApprovalRuleContent) all reused the genericErrNotFoundsentinel, whichhandleErrormaps toRepositoryDoesNotExistException— so e.g.GetFileon a missing path inside an existing repository returned "repository not found", which is both the wrong exception type (breaks SDK-sideerrors.As/type-switch handling) and a misleading message. Added dedicated sentinels (ErrFileNotFound→FileDoesNotExistException,ErrBlobNotFound→BlobIdDoesNotExistException,ErrCommentNotFound→CommentDoesNotExistException,ErrApprovalRuleNotFound→ApprovalRuleDoesNotExistException), all verified against real exception type names inaws-sdk-go-v2/service/codecommit/types/errors.go.handleError's dispatch was refactored from an 18-branchswitch(trippedcyclop) into a table (errCodeLookup) so future sentinel additions don't grow its cyclomatic complexity.
No commits touched services/codecommit/ between the prior audit (2ca17ef1) and this
one (git log 2ca17ef1..HEAD -- services/codecommit/ is empty), so the prior pass's "ok"
entries were re-verified rather than re-derived from scratch; the bugs below are new
findings from field-diffing the file/commit/merge-conflict/pagination surface against
aws-sdk-go-v2/service/codecommit@v1.33.10's generated (de)serializers.
-
ListFileCommitHistory'srevisionDagwas the wrong wire shape entirely. Each entry was a flattenedCommitmap (commitId/treeId/message/...) instead of AWS'sFileVersionshape (blobId/path/commit/revisionChildren, verified againstawsAwsjson11_deserializeDocumentFileVersionin the SDK'sdeserializers.go) — a real SDK client'sFileVersiondeserializer would find no nestedcommitobject and noblobId/pathat all. Fixed by having the backend return[]FileVersionEntry(models.go) built fromfileHistory, withrevisionChildrencomputed as a linear chain (this backend has no branch-aware file versioning — see thegapsentry on merge conflicts for why) over the unpaginated history so a page boundary never truncates a still-valid child reference. -
PutFile/DeleteFilenever recordedfileHistoryat all — onlyCreateCommit'sapplyFileChangesdid. SincePutFileis the primary single-file write path, any file added that way was invisible toListFileCommitHistorywhen queried byfilePath(silently fell through to the always-empty-history branch). Fixed: both ops now call the samerecordFileHistoryhelperCreateCommituses;fileHistory's value type changed from[]string(bare commit IDs) to[]FileHistoryEntry(commit ID + blob ID pairs, the blob ID needed for bug #1'sFileVersion.BlobId) —codecommitSnapshotVersionbumped1 -> 2since this changes a persisted table's value shape. -
PutFilestored the branch name, not the commit ID, inFile.CommitSpecifier.GetFile'scommitIdresponse field is documented as "the full commit ID of the commit that contains the content" — after aPutFile("repo", "main", ...),GetFilereturned"main"in that field instead of a real commit ID.CreateCommit'sapplyFileChangesalready did this correctly (CommitSpecifier: commitID);PutFilenow generates its commit ID before constructing theFilerow and uses it the same way. -
GetDifferencesused lowercase pagination field names; AWS uses capitalized ones for this one op. Verified against the SDK's generatedawsAwsjson11_serializeOpDocumentGetDifferencesInput/awsAwsjson11_deserializeOpDocumentGetDifferencesOutput:MaxResults/NextToken(both request and response), unlike every other paginated op in this service which uses lowercasemaxResults/nextToken. Since the handler used lowercase, a real SDK client's pagination requests were silent no-ops (always the first page). Fixed the field names and implemented real pagination viapkgs/page(closing theGetDifferences paginationdeferred item);ListFileCommitHistorypagination (also previously deferred) was implemented the same way with the correct lowercase names for that op. -
DeleteFileaccepted and silently ignoredparentCommitId(a documented gap). Real AWS'sDeleteFileInput.ParentCommitIdis a required field (verified via the SDK'svalidateOpDeleteFileInputinvalidators.go, which client-side rejects a nil value before ever sending a request) and must be the branch's current HEAD. Fixed:DeleteFilenow returnsParentCommitIdRequiredExceptionwhen empty andParentCommitIdOutdatedExceptionwhen non-empty but stale, mirroring the checkCreateCommitalready performs for its ownparentCommitId. -
CreateCommit'sfilesDeletedentries never carried ablobId, unlikefilesAdded(fixed in the prior pass).FileMetadata.BlobId(the type both arrays use) is optional but informative — mirroring the fix already applied to the standaloneDeleteFileop (which does report the removed blob),applyFileChangesnow also returns the blob ID eachdeleteFilesentry removed, and the handler threads it through. -
Six error sentinels were declared but missing from
errCodeLookup, making them unreachable.ErrBranchNameRequired,ErrInvalidBranchName(both actively returned byvalidateBranchName, used byCreateBranch),ErrParentCommitIDRequired,ErrParentCommitIDOutdated(returned byCreateCommit, and nowDeleteFile— see #5), and the still-unusedErrSameFileContent/ErrFilePathConflicts(seegaps) were all absent from the tablehandleErrorlooks up inhandler.go. Every error using one of the four active sentinels fell through to a generic 400ValidationExceptioninstead of its real, SDK-matching exception name — meaningCreateCommitwith a staleparentCommitIdhas been returning the wrong exception type since before this pass, anerrCodeLookupgap the prior pass's own refactor (which introduced the table) didn't catch because nothing exercised that path. All six now map to their real AWS exception name (still 400, matching this table's existing all-client-errors-are-400 convention). -
DeleteRepositoryleakedfileHistory[repoName]and every comment (+ reactions) belonging to the repository.fileHistorywas never touched by the cascade at all. Comments have no secondary index (commentsis a "dirty" table — see the trap below) andGetComment(commentId)does a pure by-ID lookup with no repository check, so a comment survived its repository's deletion as a permanently-reachable ghost row; the same was true of pull-request comments when their PR was cascade-deleted. Fixed:deleteCommentsForRepo/deleteCommentsForPRhelpers (repositories.go) sweepcomments/commentReactionsbyRepoName/PRid, andfileHistory[repoName]is nowdelete()-d in the same cascade. Locked byTestHandler_DeleteRepository_Cascade_{Comments,FileHistory}.
The 2026-08-23 request-side sweep (see services/codecommit/handler_files_sdk_roundtrip_test.go's
PutFile/DeleteFile fixes) left a strong but explicitly unconfirmed lead: five merge ops
looked like they dropped authorName/commitMessage/email the same way PutFile/DeleteFile
did, but merges.go itself was never opened. This pass opened it and checked each of the five
against the pinned SDK (codecommit@v1.36.4) individually rather than trusting the precedent:
MergeBranchesBySquash/MergeBranchesByThreeWay— REFUTED. Both already decodeauthorName/commitMessage/emailvia the sharedmergeBranchesRequeststruct and pass them throughMergeBranchesOptionsinto the backend, which setsCommit.AuthorName/AuthorEmail/Messagecorrectly. This was fixed by the 2026-08-07 pass (see below); the lead's own pattern-match caught these as false positives had it read the file.CreateUnreferencedMergeCommit— CONFIRMED, fixed this pass. Decode struct had none of the three fields; backend hardcodedMessage: "Unreferenced merge commit"and never setAuthorName/AuthorEmail, despite those being real trackedCommitfields populated correctly elsewhere (CreateCommit, the two ops above). Real-client proof:Test_SDKRoundTrip_CreateUnreferencedMergeCommit_CommitMetadata— creates a repo, callsCreateUnreferencedMergeCommitwithCommitMessage/AuthorName/Emailset, reads the result back viaGetCommit. Confirmed failing against unfixed code (quoted below), fixed, hand-reverted viacpand reconfirmed failing identically, restored byte-identical (md5summatched). Fix:merges.go'sCreateUnreferencedMergeCommitgained three trailing string params (authorName, authorEmail, message);handler_merges.go's decode struct gainedauthorName/email/commitMessageJSON tags.Error: Not equal: expected: "unref merge result" actual : "Unreferenced merge commit"MergePullRequestBySquash/MergePullRequestByThreeWay— MODELLING GAP, not a bug. Both drop the same three fields, but unlike every op above, neither backend method creates aCommitat all — they only flipPullRequestStatus/LastActivityDate. There is no commit object for an author/message to land on. Real AWS'sMergePullRequestBySquashOutputdoesn't even return author/message directly; that data lives inPullRequestTarget.MergeMetadata(MergeCommitId/MergedBy/IsMerged,types.go:936), a struct gopherstack'sPullRequestTargetdoesn't model. Seegapsabove; not synthesized (a decode-only fix with no backend consumer would be exactly the no-op stubparity-principles.mdrule 1 forbids).
CreateRepository — found independently while widening the scan past the five merge ops
(28 of codecommit's 30 raw candidates had never been read), CONFIRMED, fixed this pass.
createRepositoryInput dropped CreateRepositoryInput.KmsKeyId; Repository.KmsKeyID is a
real tracked field (correctly populated by UpdateRepositoryEncryptionKey, exercised by
wire_encryption_key_test.go) but CreateRepository itself never set it. A repository created
with a customer KMS key always reported an empty kmsKeyId. Real-client proof:
Test_SDKRoundTrip_CreateRepository_KmsKeyId — creates a repo with KmsKeyId set, reads it
back via GetRepository. Confirmed failing against unfixed code, hand-reverted and
reconfirmed, restored byte-identical. Fix: CreateRepository's backend signature gained a
kmsKeyID string param (all in-package callers, including five test call sites in
handler_test.go/persistence_test.go, updated); createRepositoryInput gained a
KmsKeyID json:"kmsKeyId" field.
Also checked and ruled real gaps, not bugs (see gaps above): UpdateApprovalRuleTemplateContent/
UpdatePullRequestApprovalRuleContent drop ExistingRuleContentSha256 — RuleContentSha256 is
tracked, but no comparison logic or InvalidRuleContentSha256Exception equivalent exists
anywhere in this backend, so the precondition concept itself was never built, not merely
wired to the wrong field.
Not reached this pass (named, not implied covered): the remaining unread portion of
codecommit's 30 raw candidates beyond the 5 merge ops + CreateRepository — specifically
PostCommentForComparedCommit/PostCommentForPullRequest/PostCommentReply's
ClientRequestToken/Location (checked; Comment has no such fields at all — likely the
same class of modelling gap as ExternalIds/Extensions elsewhere in this campaign, but not
verified against InvalidRuleContentSha256Exception-style error-set evidence the way the sha256
gap above was), and every List/Get op's dropped MaxResults/NextToken/filter-only params
(GetCommentsForPullRequest, GetCommentReactions, DescribePullRequestEvents's ActorArn/
PullRequestEventType, ListFileCommitHistory's CommitSpecifier, GetDifferences's
AfterPath/BeforePath) — these narrow what a real client could filter/paginate by rather than
returning wrong data for the un-filtered case, a materially different (and lower-severity) risk
profile than the four confirmed-or-refuted findings above, and were triaged by comparison against
the pinned SDK's Input structs but not each individually proven against a real client.
MergeBranchesBySquash/MergeBranchesByThreeWay(fixed 2026-08-07 to be real, distinct backend methods — see Notes) now have correct object-graph shape (parent count, branch update, honoredTargetBranch/CommitMessage/AuthorName/Email) but still don't implement content-level squash/3-way merging — this remains a known, documented gap (seegapsabove), not something newly introduced. The analogousMergePullRequestBySquash/MergePullRequestByThreeWaywere NOT touched (out of this pass's scope; they only flip PR status, no commit/branch mutation at all, so there was no parent-count distinction to fix there). The root cause of the remaining content-level gap is precisely identified (not just "no diff engine"):Filehas no per-branch or per-commit identity at all (flatrepoName|filePathkey, seefileKey), so there is no second version of a file to diff against in the first place. Don't re-flag without also proposing the branch/commit-scoped file-tree rework needed to fix it for real (large feature, not a bug fix).BatchDescribeMergeConflicts's own doc comment says "stub implementation" — that refers to the fact it never finds real conflicts (no content diffing), not that it's unwired; it does validate real backend state (repo existence) and is exercised correctly by bothBatchDescribeMergeConflictsandDescribeMergeConflicts.TestRepositoryTriggersalways reporting every trigger as asuccessfulExecutionis correct emulator behavior, matching real AWS (which also doesn't actually invoke SNS and always reports success in the common case) — do not "fix" this into a stub-detector false positive.- Comment/File/PullRequestApprovalRule tables are the 3 "dirty" tables (not on
b.registry) persisted via DTOs inpersistence.go— if you add a field toComment,File, orPullRequestApprovalRule, you must also update the matching DTO (commentSnapshot/fileSnapshot/prApprovalRuleSnapshot) or it silently won't persist. fileHistory's value type is[]FileHistoryEntry(commit ID + blob ID), not the bare[]stringof commit IDs it was before this pass — if you touch it again, remembercodecommitSnapshotVersionmust bump whenever its shape changes again (see the comment on the constant inpersistence.go).errCodeLookup(handler.go) is checked by test coverage now (#7 above added tests for the four previously-unreachable-but-active entries), but there's no automated check that every sentinel declared inerrors.gohas a table entry — a newawserr.New(...)sentinel with no matchingerrCodeLookuprow will silently fall through to genericValidationExceptionagain. Differrors.go'sErr*declarations againsterrCodeLookup'ssentinel:entries by hand if you add or suspect one.
CreateApprovalRuleTemplate/GetApprovalRuleTemplate/UpdateApprovalRuleTemplateContent: {wire: fixed} -- approvalRuleTemplateToMap emitted "approvalRuleTemplateArn"; types.ApprovalRuleTemplate has no ARN member -- templates are identified by approvalRuleTemplateId only.TestRepositoryTriggers: {wire: fixed} -- wrapped each successful trigger name in a{"triggerName": ...}object; real member (TestRepositoryTriggersOutput.SuccessfulExecutions) is[]string.
Both proven via real aws-sdk-go-v2/service/codecommit client round trips
(wire_field_fixes_y1zn_test.go), hand-reverted/confirmed-failing/restored/
md5sum-verified byte-identical.
PutFile and DeleteFile dropped commitMessage, name and email; PutFile also dropped fileMode and parentCommitId. All body-bound, all real members of PutFileInput (api_op_PutFile.go:56-77). Commit.Message was hardcoded to "Add "+path / "Delete "+path, and Commit.AuthorName/AuthorEmail -- fields that exist and are populated correctly by CreateCommit (commits.go:122-127) -- were never set. Proven by real-SDK-client round trip failing pre-fix with expected "initial import", actual "Add hello.txt".
NOT AUDITED, LIKELY THE SAME BUG: CreateUnreferencedMergeCommit, MergeBranchesBySquash, MergeBranchesByThreeWay, MergePullRequestBySquash and MergePullRequestByThreeWay all show the same missing authorName, commitMessage and email in the same scan. merges.go was never opened. Treat as unconfirmed.
paginateStrings (handler.go — backs ListBranches, ListPullRequests via the shared
helper) verified clean: boundary walk, exact division, single-page, empty, cursor-past-end,
and negative/malformed-token handling all correct (pagination_arithmetic_internal_test.go).
No bug found.
Adjacent finding, not a bug: handleListRepositories (handler_repositories.go)
hand-rolls an identical copy of paginateStrings's arithmetic instead of calling it — because
paginateStrings is typed []string, not generic, and ListRepositories paginates a []Repository
slice. The duplicated arithmetic was read and is itself correct (same clamp,
if start > len(repos) { start = len(repos) }, present). Separately: the real AWS
ListRepositoriesInput/ListBranchesInput wire shapes have no MaxResults field at all
(fixed internal batch size per AWS's own docs) — gopherstack's maxResults JSON field on
both is emulator-internal and unreachable from a real SDK client, which can only ever get one
unbounded page from either op. ListPullRequests, which does carry MaxResults on the real
wire, was used for the SDK-level pagination proof instead
(pagination_sdk_roundtrip_test.go).
Gates: go build, go vet (repo-wide), go test -race -count=1, golangci-lint run —
all clean (./services/codecommit/...).
cmd/reqfieldscan gained a fifth dispatch shape (handlers implementing
service.JSONOpFunc directly, decoding into anonymous inline structs, no
WrapOp anywhere) that made real findings newly visible in this service.
Dispatch coverage: 78/79 (99%), literal-decode-only and WrapOp-resolved
lines identical; no coverage-guard warning. The one unresolved op
(ListApprovalRuleTemplates) is a pre-existing dispatch-resolution gap
unrelated to this campaign, not investigated here (out of scope: no
request-body fields to flag on an op the scanner can't even reach).
12 fields flagged, hand-verified against codecommit@v1.36.4's own Input
structs and serializers:
- 6 real bugs, fixed (see
ops:notes above for each):TestRepositoryTriggers(tested saved triggers instead of the request's own, required list — the dominant "parsed parameter never passed on" shape this campaign keeps finding);CreateUnreferencedMergeCommit.mergeOption(required, never validated or forwarded);GetMergeCommit.mergeOption(fabricated — not a realGetMergeCommitInputmember at all, deleted);revisionIdonGetPullRequestApprovalStates,GetPullRequestOverrideState,OverridePullRequestApprovalRules,UpdatePullRequestApprovalState,EvaluatePullRequestApprovalRules(all five require it per the SDK, none validated it — one fix covering 5 ops). - 1 false positive (4 flagged fields):
mergeBranchesRequest.{TargetBranch, CommitMessage,AuthorName,Email}— a SIXTH tool blind spot, distinct from the five already known: the scanner'scollectLocalBindingsonly binds a function's own parameters and:=/=locals, never a method receiver (func (r mergeBranchesRequest) options()). All four fields are read viar.FieldNameinside that receiver method. Reported per the campaign's "report, don't patch the tool" instruction rather than fixed here.
Explicitly checked and not found this pass: no handler discarding its
entire request body; no listing found to skip its own store outside the
one already-fixed case (TestRepositoryTriggers, which was skipping its
own request in favor of stored state — arguably this shape rather than
"parameter never passed on", noted here since it doesn't cleanly fit either
bucket); the "missing existence check" shape (empty result vs. real
not-found) — RevisionID's own required-field gap is closer to a
validation gap than an existence check, and a genuine staleness/mismatch
check (InvalidRevisionIdException/RevisionNotCurrentException) was
deliberately NOT added, see the ops: notes, to avoid inventing which
error code an unmodeled mismatch should map to; no "required field
dropped, no wire member to put it in" case beyond what's covered above; no
list consumed only at its first element; no value-semantics/timestamp-format
mismatch found in this scan's flagged set.
redshiftdata was NOT touched this pass — see its own PARITY.md's 2026-08-30 note; the campaign's own spot-check verdict for it (genuine bug) did not survive re-verification against redshiftdata's existing, dated PARITY.md entries.
Tests: TestHandler_CreateUnreferencedMergeCommit_MergeOptionRequired,
TestHandler_CreateUnreferencedMergeCommit_InvalidMergeOption (new,
handler_merges_test.go); TestHandler_RevisionIDRequired (new, 5
subtests, handler_pull_request_approvals_test.go);
TestHandler_TestRepositoryTriggers (corrected, was asserting the old
wrong behavior — now asserts the request's own triggers are tested, plus a
new empty-request-with-saved-triggers case) and
TestTestRepositoryTriggers_SuccessfulExecutionsIsStringArray_RealClient
(corrected the same way, in wire_field_fixes_y1zn_test.go) — both
hand-confirmed failing against unmodified code before the fix. No other
existing test assertions were weakened; 0 dropped.
Gates: go build, go vet (repo-wide), go test -race -count=1,
golangci-lint run — all clean (./services/codecommit/...).
Audited codecommit's filter-bearing List/Describe/Merge operations for the
class this bd issue tracks: a documented filter/status semantic that is
read and applied but wrong, invisible to every field-shape or enum-legality
scan. ListPullRequests's pullRequestStatus/authorArn filters, its
sort/pagination, and every declared-but-dropped filter param already
recorded in this file's "Not reached this pass" section were re-checked and
found clean or already correctly recorded.
aws-sdk-go-v2/service/codecommit@v1.36.4's types.PullRequestStatusEnum
has exactly two members, OPEN and CLOSED — confirmed directly in
types/enums.go. UpdatePullRequestStatusInput.PullRequestStatus's own doc
comment is explicit: "The only valid operations are to update the status
from OPEN to OPEN, OPEN to CLOSED or from CLOSED to CLOSED." A merge is a
terminal CLOSED, distinguished from an explicit close only via
PullRequestTarget.MergeMetadata (MergeCommitId/MergedBy/IsMerged,
types.go:936 — a struct this backend doesn't model at all, per the
existing 2026-08-23 note above).
MergePullRequestByFastForward/BySquash/ByThreeWay (merges.go) set
pr.PullRequestStatus = "MERGED" instead of "CLOSED" — a value no real
AWS CodeCommit response ever emits and no real SDK client's
PullRequestStatusEnum can express. This corrupted ListPullRequests'
pullRequestStatus filter specifically: a real client filtering for
CLOSED (the only way to ask for terminal PRs, since MERGED isn't a
legal filter value either) would see merged PRs in real AWS but got none
back from this backend, because their stored status never matched CLOSED.
handleListPullRequests additionally accepted "MERGED" as a valid filter
value to request them by — a value a real SDK client's typed enum could
never send.
Fixed: all three merge operations now set PullRequestStatus = "CLOSED";
ListPullRequests' validation now accepts only OPEN/CLOSED (error
message updated); the now-redundant == prStatusMerged guard clauses in
pull_requests.go (blocking mutation of an already-terminal PR) collapsed
to the prStatusClosed check alone; the now-unused prStatusMerged
constant removed from handler.go. UpdatePullRequestStatus's existing,
correct rejection of an explicit "MERGED" input status (it's not a legal
transition target either) is untouched.
Known, not fixed — out-of-scope, cosmetic-only: ui/src/routes/codecommit/+page.svelte:222
has a status-badge color mapping for the literal string 'MERGED', which
can now never match. Outside this pass's services/codecommit/ scope and
not a Go caller broken by a signature change (no signature changed), so not
touched; the badge will fall through to whatever color the mapping uses for
an unrecognized status. Flagged for whoever next touches that page.
Test: TestHandler_ListPullRequests_ClosedFilterIncludesMerged (new,
handler_pull_requests_test.go), hand-confirmed failing against unmodified
code before the fix (merged status "MERGED" instead of "CLOSED", empty
CLOSED-filtered list instead of one match).
TestHandler_MergePullRequest_StatusBecomesmerged (renamed
...StatusBecomesClosed) and the three merge-response assertions in
handler_merges_test.go were asserting the bug ("MERGED") and are now
corrected to assert "CLOSED" — 4 assertions changed, 0 dropped. The three
UpdatePullRequestStatus validation tests asserting "MERGED" is REJECTED
as an explicit input status are unrelated (that rejection was already
correct) and untouched.
ListPullRequests'pullRequestStatus/authorArn: neither field documents behaviour on absence beyond "if used, this refines the results" — no omission-default language exists on either field (api_op_ListPullRequests.go), so empty-means-no-filter is correct as implemented.ListRepositories'sortBy/order: realListRepositoriesInputdocuments no default for either enum; the emulator's repositoryName-ascending default is a reasonable, undocumented choice, not a contradiction of documented behaviour.GetDifferences' droppedbeforeCommitSpecifier(structurally unfixable — no per-commit file tree exists to diff against, see the existinggopherstack-3bsbnote above) andGetDifferences/DescribePullRequestEvents/GetCommentsForPullRequest/GetCommentReactions/ListFileCommitHistory's other dropped filter params are the OTHER axis (never read/applied at all) — already correctly recorded in this file's "Not reached this pass" section; re-confirmed present, not re-litigated as this class's bug.
Gates: go build, go vet (repo-wide, clean), go test -race -count=1,
golangci-lint run (0 issues) — all clean (./services/codecommit/...).
Work left uncommitted per this pass's instructions.
No prior error-envelope/errtargetaudit entry existed for this service (screened before
starting). cmd/errtargetaudit (declared-vs-emitted error-code cross-check against
codecommit@v1.36.4's deserializeOpError<Op> tables) reported: operations with SDK ground
truth 79, resolved 79, emission found for 76, no coverage warning; 3 class A findings.
awk "/deserializeOpErrorCreateCommit\(/,/^}/" deserializers.go | grep -oE '"[A-Za-z0-9]+"'
lists CreateCommit's entire declared error set (35 codes) — SameFileContentException is
not among them; NoChangeException is ("The commit cannot be created because no changes
will be made to the repository as a result of this commit", per the real API docs' Errors
section). SameFileContentException's own doc ("The file was not added or updated because
the content of the file is exactly the same...") is PutFile's exception specifically, and
PutFile's declared set does contain it (confirmed the same way) — PutFile's own identical-
content check (files.go:48) was untouched, it already used the right code. CreateCommit's
putFiles-identical-content check (commits.go, added by the 2026-08-07 gopherstack-3bsb
pass) reused PutFile's ErrSameFileContent sentinel for a different op with a different
declared error set — a global-sentinel-map-shaped bug (gopherstack-hdvu's class), fixed per
call site: new ErrNoChange sentinel (errors.go) wired to NoChangeException in
errCodeLookup, used only by CreateCommit's check; ErrSameFileContent/PutFile untouched.
Same extraction for GetCommit's declared set: CommitIdDoesNotExistException,
CommitIdRequiredException, plus repo/encryption/invalid-id codes — no
CommitDoesNotExistException. The real API docs' GetCommit Errors section lists
CommitIdDoesNotExistException — "The specified commit ID does not exist" — a distinct
type from CommitDoesNotExistException ("The specified commit does not exist or no commit
was specified, and the specified repository has no default branch", confirmed via
types/errors.go's doc comments on both). The shared ErrCommitNotFound sentinel
(errors.go) is correctly CommitDoesNotExistException for every other caller
(branches.go's CreateBranch, merges.go's resolveCommitSpecifier users —
BatchDescribeMergeConflicts/CreateUnreferencedMergeCommit/DescribeMergeConflicts/
GetCommentsForComparedCommit/the merge family — all confirmed against their own declared
sets, all correct, untouched); only GetCommit's own by-ID lookup (commits.go) needed the
other exception. Fixed per call site, not per sentinel: new ErrCommitIDNotFound sentinel
wired to CommitIdDoesNotExistException, used only by GetCommit's not-found return.
The flagged line (commits.go) is a composite-literal BatchCommitError.ErrorCode field
inside the per-commitId errors list of a 200 response — document data, not a thrown
exception, so it has no entry in deserializeOpErrorBatchGetCommits at all (confirmed: that
op's declared set has only CommitIdsLimitExceededException/CommitIdsListRequiredException
plus the usual repo/encryption codes — no commit-not-found code of either name). Not changed:
the real docs for BatchGetCommitsError.errorCode don't enumerate valid string values (unlike
the typed exceptions above), so there's no positive evidence the current string is wrong —
only that GetCommit's sibling by-ID lookup uses the ...Id... variant, which is suggestive
but not proof for a free-string field with no declared enum. Left as a documented open
question (see ops: above) rather than a synthesized remedy.
Per-line neuter: reverted commits.go's ErrNoChange (CreateCommit) back to
ErrSameFileContent — compiled, TestHandler_CreateCommit_NoChange failed on the asserted
__type ("NoChangeException" vs "SameFileContentException"), restored. Reverted
ErrCommitIDNotFound (GetCommit) back to ErrCommitNotFound — compiled,
TestHandler_GetCommit_CommitIDNotFound failed the same way ("CommitIdDoesNotExistException"
vs "CommitDoesNotExistException"), restored.
Pre-existing test correction: TestHandler_CreateCommit_SameFileContent (handler_commits_ test.go) asserted SameFileContentException for CreateCommit's identical-content rejection
— the exact bug fixed above, with no note that it pinned wrong behavior. Renamed
TestHandler_CreateCommit_NoChange, assertion corrected to NoChangeException, comment added
citing this issue. 1 test corrected, 0 dropped. New regression test:
TestHandler_GetCommit_CommitIDNotFound (no pre-existing test asserted GetCommit's not-found
__type at all).
Re-ran cmd/errtargetaudit after the fix: codecommit's class A findings dropped from 3 to 1
(the BatchGetCommits false positive above; unchanged, not a regression).
Gates: go build, go test -race -count=1 ./services/codecommit/... (ok),
golangci-lint run services/codecommit/... (0 issues).
Follow-up to section 3 above, which correctly left the value question open (the finding itself was, and remains, a confirmed class-1 false positive — not re-litigated here).
Evidence: codecommit@v1.36.4's api-2.json types GetCommitInput.commitId
and BatchGetCommitsError.commitId both as the ObjectId shape (a raw,
required, full-SHA lookup with no specifier resolution). CreateBranchInput. commitId and every other operation whose declared error set includes
CommitDoesNotExistException (CreateBranch, BatchDescribeMergeConflicts,
CreateUnreferencedMergeCommit, DescribeMergeConflicts,
GetCommentsForComparedCommit, GetCommentsForPullRequest, GetDifferences,
GetFile, GetFolder, GetMergeCommit, GetMergeConflicts,
GetMergeOptions, ListFileCommitHistory, the three MergeBranchesBy* ops,
PostCommentForComparedCommit, PostCommentForPullRequest) instead use the
distinct CommitId shape, reserved for specifier-resolution fields (branch
tips, before/after commit, merge base) per docs-2.json's refs. GetCommit
is the only operation in the service whose declared error set has
CommitIdDoesNotExistException — confirmed against deserializeOpErrorGetCommit
and api-2.json's per-op errors list.
The live API reference for BatchGetCommits corroborates independently: its
errors[] doc text — "if one of the commit IDs was a shortened SHA ID or that
commit was not found in the specified repository" — names exactly the two
failure modes GetCommit's own declared set distinguishes as
InvalidCommitIdException and CommitIdDoesNotExistException, not the
specifier-resolution condition CommitDoesNotExistException describes ("no
commit was specified, and the specified repository has no default branch").
BatchGetCommitsError.errorCode itself still has no enumerated values in
either docs-2.json or the live API reference — confirmed again this pass,
no new information there. The type-shape identity to GetCommit is what
settles it, not the errorCode field's own doc.
Fixed: commits.go's BatchGetCommits not-found entry now uses
CommitIdDoesNotExistException. New regression test
TestHandler_BatchGetCommits_ErrorCodeIsCommitIdDoesNotExist
(handler_commits_test.go) — failed pre-fix with expected: "CommitIdDoesNotExistException" / actual: "CommitDoesNotExistException", now
passes. No pre-existing test asserted this field's value, so nothing else
changed.
Gates: golangci-lint run ./services/codecommit/... (0 issues), go test -race ./services/codecommit/... (ok).
Filed as "codecommit: no caller-identity plumbing, so actorArn filters cannot
work" (P3, title-only, empty description). The premise was imprecise:
pkgs/awsmeta + services/iam/services/sts do resolve caller identity, and
that resolution is wired repo-wide, not per-service -- internal/app/cli.go's
awsMetaMiddleware (e.Pre, applies to every request) and principalMiddleware
(registry.Use, applies to every registered service including codecommit)
populate awsmeta.CallerArn(ctx) before any service's dispatch ever runs. The
real defect was narrower and local to this package: codecommit's own
dispatch discarded that ctx (func (h *Handler) dispatch(_ context.Context, ...)), and OverridePullRequestApprovalRules -- the one op that records a
PullRequestEvent -- hardcoded its actor to "" even though its backend
signature already had an overriderARN parameter to receive it
(handler_pull_requests.go, pre-fix: h.Backend.OverridePullRequestApprovalRules(req.PullRequestID, req.OverrideStatus, "")). Confirmed via OverridePullRequestApprovalRulesInput
(codecommit@v1.36.4 api_op_OverridePullRequestApprovalRules.go / botocore
service-2.json): it has no actor/overrider ARN field at all -- real AWS derives
"who overrode" purely from caller identity, exactly what awsmeta.CallerArn
already resolves.
DescribePullRequestEventsInput.ActorArn ("The Amazon Resource Name (ARN) of
the user whose actions resulted in the event. Examples include updating the
pull request with more commits or changing the status of a pull request.",
api_op_DescribePullRequestEvents.go:36-39, confirmed against botocore's
longer service-2.json doc string) was silently dropped: the decode struct
in handleDescribePullRequestEvents had no ActorArn field, so a
client-supplied filter was ignored outright (not merely unvalidated -- never
read). actorArn's wire shape is Arn (an unconstrained string in the
model), but the operation's declared error set includes
InvalidActorArnException ("Make sure that you have provided the full ARN
...") and ActorDoesNotExistException ("does not exist in the Amazon Web
Services account").
Fixed (in scope -- uses existing plumbing, no new identity mechanism, no cross-service wiring):
PullRequestEventgained anActorARNfield (models.go).OverridePullRequestApprovalRulesnow stores its (already-passed)overriderARNonto the event it creates (pull_requests.go).dispatchnow special-casesOverridePullRequestApprovalRulesto call it withctx(rather than growing theopstable's function type tofunc(context.Context, []byte)across all 79 other ops, out of proportion to a one-op fix) andhandleOverridePullRequestApprovalRulesextractsawsmeta.CallerArn(ctx)in place of the old""literal.handleDescribePullRequestEventsparsesactorArn, validates it as an ARN shape (newErrInvalidActorArn/InvalidActorArnException,errors.go'sactorArnRe), and bothDescribePullRequestEvents(backend) and the wire response now filter/echo by it.
NOT fixed, and explicitly out of scope for this pass:
ActorDoesNotExistException-- checking that an ARN names a real account principal would require coupling codecommit to IAM's user/role store cross-service, which the audit brief excluded.- 8 of the 9 real
PullRequestEventTypevalues are never recorded by any backend operation -- onlyPULL_REQUEST_APPROVAL_RULE_OVERRIDDENis (the soleb.prEvents[prID] = append(...)call site in the package, before this pass). actorArn filtering is consequently only observable against that one event type today; this is a pre-existing structural gap in event recording, independent of caller identity, and was not widened or narrowed by this fix.
Verdict: (i) -- the plumbing exists and codecommit simply wasn't using it, so
this was a fixable defect, not a structural blocker. Not a pure case of
"just call awsmeta.CallerArn(ctx) at filter time", though: actorArn
attributes each past event to whoever performed that action, which meant
capturing identity at event-creation time (already ctx-available at
dispatch), not at query time.
New regression test TestOverridePullRequestApprovalRules_RecordsCallerAsActorArn
(actor_arn_test.go), 4 subtests, all failing pre-fix:
matches_caller: expected the recorded event'sactorArnto equal the caller's ARN, got<nil>(field absent).no_filter_returns_all: same<nil>failure (event existed but carried no actor).different_actor_returns_none: expected 0 events filtering by a different actor, got 1 (filter param didn't exist, so nothing was ever excluded).malformed_arn_rejected: expected HTTP 400 /InvalidActorArnException, got HTTP 200 with the (unfiltered) event list. All 4 pass post-fix. One pre-existing call site updated for the new backend signature (persistence_test.go'sfresh.DescribePullRequestEvents(pr.PullRequestID, "", ""), third arg added) -- no assertion changed, purely mechanical.
Stability: new test run 10x under -race -count=1 (all pass), full package
run 5x under -race -count=1 (all pass). No global/shared state involved
(fresh backend/handler per test, no package-level mutable state touched).
Gates: go build ./services/codecommit/... (clean), go vet ./services/codecommit/... (clean), golangci-lint run ./services/codecommit/... (0 issues), go test -race ./services/codecommit/... (ok).
Worked all 32 tier-1 findings from cmd/reqfielddiff for this service.
codecommit is not the generic jsonOp(h.Backend.<Op>) shape (slice-1's blind
spot) -- every op decodes its own hand-written anonymous request struct -- so
the tool's findings here are all genuine undecoded fields, not fields read
via a shape the tool can't see. 0 false positives.
7 of 32 were DROPPED PARAMETER, fixed with tests in
realclient_dropped_parameter_fields_test.go (TestRealClient_DroppedParameterFields, 7
cases, real typed aws-sdk-go-v2/service/codecommit client):
DescribePullRequestEvents.MaxResults,GetCommentReactions.MaxResults,GetCommentsForComparedCommit.MaxResults,GetCommentsForPullRequest.MaxResults: each op decoded MaxResults/NextToken nowhere and always returned its entire result set. Now paginated viapkgs/page, matching this service's existingGetDifferences/ListFileCommitHistorypattern. The two comment-family ops paginate thecommentslist nested inside the single group this backend already returns (see their PARITY.md notes for why: no per-diff-position grouping is modeled, so the outer group list is always <=1 element).GetDifferences.AfterPath: decoded nowhere; MaxResults/NextToken were already correctly wired (see the existing ops-table row) but the path filter that's supposed to narrow the diff set entirely was dropped. Now filters to an exact path match or directory-prefix match.CreateCommit.KeepEmptyFolders/DeleteFile.KeepEmptyFolders: decoded nowhere. This backend's folders are synthetic --GetFolder/GetFolderFilesderive them by scanning existing file paths for a prefix match, so a folder emptied by a deletion already vanished from those listings, matching AWS's documentedKeepEmptyFolders=falsedefault.truewas a real, silent no-op. Fixed by a new sharedkeepEmptyFoldersLocked(commits.go) that drops a.gitkeepmarker file under a folder a deletion just emptied, keeping it visible viaGetFolder.PutResourceConfig- style prefix matching factored intopathMatchesFilter, reused byGetDifferences.AfterPathabove.
25 of 32 were MISSING FEATURE, recorded under items_still_open (not
synthesized): ConflictDetailLevel/ConflictResolutionStrategy on
BatchDescribeMergeConflicts, CreateUnreferencedMergeCommit,
DescribeMergeConflicts, GetMergeCommit, GetMergeConflicts,
GetMergeOptions, MergeBranchesBySquash, MergeBranchesByThreeWay,
MergePullRequestBySquash, MergePullRequestByThreeWay (20 fields) and
KeepEmptyFolders on the five merge ops in that same list that never model a
file-level deletion at all (5 fields) -- all trace to the same pre-existing,
already-extensively-documented root cause: File has no per-branch identity
(flat repoName|filePath keying), so there is no second version of any file
for these ops to diff or merge, and no deletion for the merge-side
KeepEmptyFolders fields to apply to. See the items_still_open entries
above (some pre-dating this pass) for the full root-cause writeup; this pass
only added the two new bullets naming the specific tier-1 fields.
No persisted struct fields changed, no version bump.
Gates: go build ./..., go vet ./services/codecommit/..., go test -race -count=1 ./services/codecommit/... (pass, including the new suite),
golangci-lint run --new-from-rev=HEAD ./services/codecommit/... (0 issues).
cmd/paritylint stays at 0 missing-items-still-open FAIL.
CodeCommit is region-isolated: per-region sibling handlers: each non-home region gets a lazily built sibling Handler (own repositories, branches, pull requests, triggers, region-correct ARNs and clone URLs) via pkgs/regionpeers. Same-named resources coexist per region. Snapshots gain an additive regions key only when a sibling exists (no version bump; older snapshots restore). NewHandler alone stays single-region. Proof: TestHandler_MultiRegionIsolation, TestHandler_MultiRegionPersistence, TestRegionIsolation/codecommit. Limitation: Non-home regions are not visible to the tagging-API bridge or the dashboard.
The Resource Groups Tagging API bridge now lists the request region's tagged resources and resolves TagResources/UntagResources by the ARN's region, superseding the earlier home-region-only limitation. Proof: TestInitializeServices_TaggingBridgeFollowsRegion.
Per-commit trees (Commit.Tree, path to blob and mode) and a blob store now back every commit made by CreateCommit, PutFile, DeleteFile and the merge ops; commits that predate trees read as a snapshot of the repository's flat file view. Persistence is additive (Commit.tree/hasTree, backendSnapshot.blobs), no version bump.
- MergeBranchesBySquash/ByThreeWay, MergePullRequestBySquash/ByThreeWay, CreateUnreferencedMergeCommit: real three-way merge of the destination and source trees against the merge base. ConflictDetailLevel FILE_LEVEL (default) conflicts on any file changed differently in both; LINE_LEVEL runs a line diff3 and conflicts only on overlapping or touching hunks; ConflictResolutionStrategy NONE (default) leaves conflicts unresolved (
ManualMergeRequiredException, PR stays open), ACCEPT_SOURCE/ACCEPT_DESTINATION resolve conflicting files (or hunks at LINE_LEVEL), AUTOMERGE attempts the line merge even at FILE_LEVEL; ConflictResolution replaceContents (KEEP_BASE/KEEP_SOURCE/KEEP_DESTINATION/USE_NEW_CONTENT), deleteFiles and setFileModes resolve named conflicting files (entries are validated: InvalidReplacementType, ReplacementContentRequired, MultipleConflictResolutionEntries, InvalidFileMode, PathRequired). KeepEmptyFolders adds.gitkeepto folders the merge emptied. Squash commits have one parent, three-way two. FAST_FORWARD is rejected by CreateUnreferencedMergeCommit and DescribeMergeConflicts (documented in the SDK). - GetMergeConflicts/DescribeMergeConflicts/BatchDescribeMergeConflicts/GetMergeOptions/GetMergeCommit read the same evaluation, so they agree: mergeable and conflictMetadataList reflect unresolved conflicts, metadata carries fileSizes/fileModes/mergeOperations/objectTypes and the content, file-mode and object-type flags, DescribeMergeConflicts returns line hunks (base64) with isConflict, maxConflictFiles/maxMergeHunks/nextToken page. GetMergeOptions offers FAST_FORWARD only when the destination is an ancestor of the source and SQUASH/THREE_WAY only when mergeable. GetMergeCommit returns an existing or newly created unreferenced three-way merge commit (no commit when conflicts remain). BatchDescribeMergeConflicts errors now use the real
exceptionName/filePath/messagekeys and report unknown paths as FileDoesNotExistException. - GetFile/GetFolder/GetBlob/GetDifferences now honor the commit specifier through trees (GetDifferences reports A/M/D); CreateCommit/PutFile same-content checks compare against the branch tip's tree rather than the repository-wide file view. Tests:
merge_content_test.go(typed aws-sdk-go-v2 client). - Not modeled: see items_still_open. State is bounded only by commit history (blobs are kept per repository for every referenced commit).
FIXED: ListApprovalRuleTemplates, ListAssociatedApprovalRuleTemplatesForRepository and ListRepositoriesForApprovalRuleTemplate page through maxResults/nextToken; ListBranches, ListPullRequests, ListRepositories and the three new ones share paginateSlice, which returns InvalidContinuationTokenException for a malformed token (deserializers.go declares it on all seven) instead of restarting. ListTagsForResource NextToken is a false positive (declares no token error; bounded by the tag cap). Proof: TestListOps_PageAndRejectBadTokens.
- Error messages no longer repeat the exception name; repository and branch lookups read " does not exist" (
TestRealism_Errors). - CreateRepository/UpdateRepositoryName reject names ending in
.git; descriptions over 1000 characters are InvalidRepositoryDescriptionException; ListRepositories rejects unknown sortBy/order (InvalidSortBy/InvalidOrder). - CreatePullRequest validates the repository, source and destination branches (ReferenceDoesNotExist), identical refs (SourceAndDestinationAreSame), a single repository, title <= 100 and description <= 1000; GetPullRequest rejects non-numeric ids (InvalidPullRequestId).
- The first branch created becomes the repository default branch; destination defaults to it. Commit, tree and blob ids are 40-char hex.
- GetFolder lists only the immediate files and subFolders (with relativePath, treeId), returns the commit id, and FolderDoesNotExistException for a missing folder (
TestRealism_FolderListing).
- Merge limits TipsDivergenceExceeded, MaximumItemsToCompareExceeded, MaximumFileContentToLoadExceeded and MaximumConflictResolutionEntriesExceeded are never raised: the pinned SDK documents no numeric limit to enforce. Unverifiable.