Skip to content

fix: address post-merge review findings from PR #63 - #64

Merged
danielewood merged 6 commits into
mainfrom
fix/pr63-review-findings
Feb 24, 2026
Merged

fix: address post-merge review findings from PR #63#64
danielewood merged 6 commits into
mainfrom
fix/pr63-review-findings

Conversation

@danielewood

Copy link
Copy Markdown
Collaborator

Summary

  • Fix AIA progressTotal double-counting persistently-unresolved certs — uses a totalSeen set to track unique certs that ever entered the queue, preventing overlap between processed and queue sets
  • Restructure TestCheckKeyStrength to generate keys inside subtests with proper t.Fatal error handling (ERR-5)
  • Consolidate TestCheckTrustChain_NilRoots and _SelfSigned into a single table-driven TestCheckTrustChain (T-12)
  • Add missing changelog entries for PR fix: address post-merge review findings from PR #62 #63 production changes (CL-1)

Addresses claude-review findings on #63.

Test plan

  • go test -race ./... passes
  • WASM builds (GOOS=js GOARCH=wasm go build ./cmd/wasm/)
  • Pre-commit hooks pass

🤖 Generated with Claude Code

- Fix AIA progressTotal double-counting persistently-unresolved certs
  by tracking unique certs in a totalSeen set instead of recomputing
  from processed + queue (which overlap)
- Restructure TestCheckKeyStrength to generate keys inside subtests
  with proper t.Fatal error handling (ERR-5)
- Consolidate TestCheckTrustChain_NilRoots and _SelfSigned into a
  single table-driven TestCheckTrustChain (T-12)
- Add missing changelog entries for PR #63 production changes (CL-1)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 24, 2026 13:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Follow-up fixes to address review findings from PR #63, improving AIA progress accounting, strengthening validation unit tests, and updating the changelog to reflect shipped behavior.

Changes:

  • Update AIA resolution progress tracking to avoid double-counting certs that persist across depth rounds.
  • Refactor/merge validation tests to generate keys within subtests and use table-driven structure.
  • Add missing CHANGELOG.md entries referencing PR #63 production changes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
internal/certstore/validate_test.go Refactors validation tests for safer key generation and consolidates trust chain tests into a table-driven form.
internal/certstore/aia.go Adjusts progress total calculation to track unique certs seen across rounds.
CHANGELOG.md Adds missing Unreleased entries and a PR link reference for #63.

Comment thread internal/certstore/aia.go Outdated
Comment thread internal/certstore/aia.go
@claude

This comment has been minimized.

@claude

This comment has been minimized.

- Use certID (serial+AKI) instead of SubjectKeyId for totalSeen and
  processed maps — SKI is not unique across cross-signed certs
- Add TestResolveAIA_ProgressNoDuplicateCounting asserting completed
  never exceeds total when fetches fail across depth rounds
- Fix changelog: progressTotal fix refs #64 not #63, add [#64] link

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude

This comment has been minimized.

@claude

This comment has been minimized.

The early-exit branch (when all AIA URLs are already seen) still used
rec.SKI while the normal path used certID(rec.Cert). This mismatch
could reintroduce the completed > total overflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 24, 2026 14:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread internal/certstore/aia_test.go Outdated
@claude

This comment has been minimized.

The previous test used an always-failing fetcher, so the loop exited
after one round (fetched == 0). Restructure with two leaves: one whose
AIA fetch succeeds (keeping the loop alive) and one that always fails
(re-entering the queue in round 2). This actually exercises the
double-counting fix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude

This comment has been minimized.

The previous assertions (completed <= total, final == 100%) were
tautological — they pass even with the old buggy formula. Assert
that total stays at exactly 2 across all ticks, which fails with
the old len(processed)+len(queue) formula that inflated to 3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 24, 2026 15:14
Add sections on pre-commit hook recovery, resolving review threads
via GraphQL, merge checklist, and changelog ref attribution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@claude

claude Bot commented Feb 24, 2026

Copy link
Copy Markdown

Code review

1 issue found.

CHANGELOG.md — CL-2 violation: ### Added should be ### Changed

Line 16

The entry:

- Extract `RunValidation`, `CheckExpiration`, `CheckKeyStrength`, `CheckSignature`, `CheckTrustChain` from WASM into `internal/certstore`...

These five functions already existed in the WASM build — they were extracted/moved to internal/certstore, not created from scratch. Per Keep a Changelog, Added is for new features and Changed is for changes in existing functionality.

The project's own precedent in [0.7.0] places equivalent moves under ### Changed:

Move ParseContainerData into internal/certstore for shared CLI/WASM use

Additionally, the companion entry two lines below (under ### Changed) modifies RunValidation's behavior, which is inconsistent with RunValidation also being listed as Added in the same release block.

Per CLAUDE.md CL-2: Changed is the correct subsection. This entry should move to ### Changed.

@danielewood
danielewood merged commit fc2c2cb into main Feb 24, 2026
15 checks passed
@danielewood
danielewood deleted the fix/pr63-review-findings branch February 24, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants