Skip to content

fix(ci): dedupe capture-aws-control server, unbreak jscpd gate on main - #6434

Merged
NicholasRBowers merged 1 commit into
mainfrom
fix/jscpd-capture-clone
Aug 28, 2026
Merged

fix(ci): dedupe capture-aws-control server, unbreak jscpd gate on main#6434
NicholasRBowers merged 1 commit into
mainfrom
fix/jscpd-capture-clone

Conversation

@CrysisDeu

Copy link
Copy Markdown
Collaborator

Problem / Motivation

The Copy/paste detection step (npx jscpd ., threshold 0%) in Frontend Lint & Type Check fails on every branch cut from current main: ERROR: jscpd found too many duplicates (0.01%) over threshold (0%). Reproduced on a pristine origin/main worktree with the pinned jscpd — this is main's own breakage, not any PR's.

Why it matters

Every open PR red-lights on a gate its diff cannot influence; contributors burn CI rounds triaging a failure that is inherited. (Hit live while babysitting #6428.)

What changed (motivation → approach → change)

capture-aws-control.mjs (landed recently) hand-rolled the same 17-line static-file server that capture-hero-art-proxy.mjs carries, pushing repo-wide duplication from one tolerated clone (rounds to 0%) to two (0.01% > 0%). The repo already has the shared harness helper for exactly this: scripts/lib/serve-dist.mjs. The fix deletes the hand-rolled server from capture-aws-control.mjs and uses serveDist() (ephemeral port instead of hardcoded 6813, same SPA-fallback + /logo.png behavior — the helper is the canonical implementation the other harnesses use).

Tests

jscpd on this branch: back to 1 clone / exit 0 (the pre-existing queue-edit/upload-error pair, which rounds to 0% and passes). N/A for unit tests — capture harness script, not shipped code.

Manual verification

Ran the fixed script end-to-end against a built dist (node scripts/capture-aws-control.mjs /tmp/aws-verify): server starts on an ephemeral port, SPA loads, home.png and account.png captured. node --check clean.

Why no screenshot: capture-harness plumbing only; no shipped UI renders differently.

Related Issues

no linked issue: found while babysitting #6428; fixed directly as a main-unblocker.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality — N/A, harness script
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable) — N/A
  • No secrets, credentials, or internal references in the diff

capture-aws-control.mjs duplicated capture-hero-art-proxy.mjs's 17-line
static server verbatim, tipping repo-wide jscpd duplication to 0.01%
over the 0% threshold -- every branch cut from main fails the
Copy/paste detection gate. Use the shared scripts/lib/serve-dist.mjs
helper (ephemeral port, same SPA fallback + /logo.png route) instead.
@CrysisDeu
CrysisDeu requested a review from a team as a code owner August 27, 2026 23:51
@CrysisDeu
CrysisDeu requested a review from iamwhatever August 27, 2026 23:51
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Aug 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of a2db9d2bec83a5c679e783ad6a0c4a3d136d4b5e — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: PASS

Developer-only refactor of a screenshot-capture script; no user-facing UI, strings, states, or screenshots change — nothing a product user ever sees.

[UX-REVIEWED] a2db9d2

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of a2db9d2bec83a5c679e783ad6a0c4a3d136d4b5e — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Root-cause dedupe onto the existing canonical helper (serveDist), not a threshold bump or jscpd ignore — the right shape, verified end-to-end.

[DESIGN-REVIEWED] a2db9d2

@github-actions

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed a2db9d2bec83a5c679e783ad6a0c4a3d136d4b5e — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] a2db9d2

Verdict parsed from the review's SHA-scoped output markers for commit a2db9d2bec83a5c679e783ad6a0c4a3d136d4b5e.

False positive or not applicable? A repository writer can comment:
/ai-review override fable a2db9d2bec83a5c679e783ad6a0c4a3d136d4b5e: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of a2db9d2bec83a5c679e783ad6a0c4a3d136d4b5e and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] a2db9d2

False positive or not applicable? A repository writer can comment:
/ai-review override gpt a2db9d2bec83a5c679e783ad6a0c4a3d136d4b5e: <one-sentence reason>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Aug 28, 2026
@NicholasRBowers
NicholasRBowers enabled auto-merge (squash) August 28, 2026 00:28

@NicholasRBowers NicholasRBowers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tier 1 auto-approve: fix (1 file). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, SAST annotations clean, security checklist all-NO, AI reviewers green. Category: single-file CI capture-script fix with clear root cause — replaces the duplicated inline static server in capture-aws-control.mjs with the shared serveDist() helper, unbreaking the jscpd duplication gate on main.

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