Skip to content

fix: close final bug-hunt blockers (release verifier archive-mode + test hygiene + sidebar mock)#26

Merged
spearchucker667 merged 1 commit into
mainfrom
codex/fix-identified-blockers-in-audit-report
Jun 18, 2026
Merged

fix: close final bug-hunt blockers (release verifier archive-mode + test hygiene + sidebar mock)#26
spearchucker667 merged 1 commit into
mainfrom
codex/fix-identified-blockers-in-audit-report

Conversation

@spearchucker667

Copy link
Copy Markdown
Owner

Motivation

  • Close the five remaining blockers from the final massive bug-hunt by making archive-mode verification resilient to local generated install/build artifacts, removing a tracked stale coverage output file, eliminating secret-shaped test noise, and fixing a Sidebar test mock contract that caused noisy logs during passing tests.

Description

  • Teach scripts/verify-release-packaging-hardening.cjs to ignore local generated install/build directories in archive-mode filesystem scans by adding ARCHIVE_MODE_IGNORED_GENERATED_DIRS and isIgnoredGeneratedArchiveModePath(rel) while preserving strict git-tracked contaminant checks.
  • Add a regression test in scripts/verify-release-packaging-hardening.test.ts that proves archive-mode validation succeeds on a no-.git source-drop that contains node_modules/ and dist/ build artifacts.
  • Complete the desktopConversations mock in src/components/layout/sidebar.test.tsx to include save, delete, and pullContext so shared chat-store paths no longer log desktopConversations.save is not a function.
  • Replace synthetic secret-shaped test text in src/hooks/use-chat.test.ts (sk-...) with a non-secret placeholder redacted-test-token to avoid secret-scanner bait while keeping redaction assertions intact.
  • Remove the tracked stale cov_output.txt file and update docs/summary_of_work.md with the session handoff and validation notes.
  • Tighten pattern checks in the verifier for electron-builder.config.cjs owner/repo using robust regex matching.

Testing

  • Ran the targeted Vitest subset: npx vitest run scripts/verify-release-packaging-hardening.test.ts src/hooks/use-chat.test.ts src/components/layout/sidebar.test.tsx src/components/research/ResearchWorkspaceView.test.tsx --fileParallelism=false and it passed (selected tests).
  • Verified lint and typechecking with npm run lint:eslint and npm run typecheck, both succeeded.
  • Ran packaging verifiers npm run verify:release-packaging-hardening and npm run verify:research-workspace, both succeeded (release-packaging reported PASS with updated archive-mode behavior).
  • Ran npm run verify:markdown-links and git diff --check, both succeeded.
  • Attempted full npm test (serial Vitest) but the non-interactive run produced no per-file progress and was terminated (pkill -f "vitest run"); this is recorded in the session ledger and does not block the targeted verifiers that were run and passed.

Codex Task

Copilot AI review requested due to automatic review settings June 18, 2026 16:00

Copilot AI 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.

Pull request overview

This PR closes the remaining “final bug-hunt” release blockers by hardening the Phase 2J release-packaging verifier for archive-mode source drops, cleaning up test hygiene to avoid secret-shaped noise, and fixing a Sidebar test mock contract that was generating noisy logs during otherwise passing tests.

Changes:

  • Update verify-release-packaging-hardening.cjs archive-mode scanning to ignore common locally-generated build/install directories (while keeping git-tracked contaminant checks strict when .git exists).
  • Improve verifier CLI test diagnostics and add a new archive-mode regression test case.
  • Fix unit-test hygiene: complete desktopConversations mock surface and replace secret-shaped test token text; remove stale tracked coverage output and update the session ledger.

Reviewed changes

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

Show a summary per file
File Description
src/hooks/use-chat.test.ts Replaces secret-shaped bearer token test input with a non-secret placeholder while preserving redaction assertions.
src/components/layout/sidebar.test.tsx Extends the desktopConversations mock surface to match current chat-store call paths and reduce noisy test logs.
scripts/verify-release-packaging-hardening.test.ts Improves assertion output and adds an archive-mode test case for “generated dirs present” scenarios.
scripts/verify-release-packaging-hardening.cjs Makes archive-mode filesystem walk skip common generated directories; tightens owner/repo matching using regex.
docs/summary_of_work.md Updates mandatory session handoff summary, TODO ledger, and validation matrix.
cov_output.txt Deletes a stale tracked coverage output artifact.

Comment on lines +233 to +239
it("archive mode ignores generated install/build directories after local validation", () => {
const root = createMinimalValidRepo("venice-relpkg-generated-allow-");
try {
mkdirSync(join(root, "node_modules", "pkg"), { recursive: true });
writeFileSync(join(root, "node_modules", "pkg", "index.js"), "module.exports = {};\n");
mkdirSync(join(root, "dist", "assets"), { recursive: true });
writeFileSync(join(root, "dist", "assets", "app.js"), "console.log('built');\n");
Comment on lines +13 to 15
pullContext: () => Promise.resolve({ ok: false, context: { injectedText: '', facts: [], summaries: [], tokenEstimate: 0 }, error: 'mock' }),
},
desktopChat: { list: () => Promise.resolve({ ok: false, conversations: [], truncated: false, totalScanned: 0, error: 'mock' }) },
@spearchucker667 spearchucker667 merged commit 97242f3 into main Jun 18, 2026
7 of 11 checks passed
@spearchucker667 spearchucker667 deleted the codex/fix-identified-blockers-in-audit-report branch June 18, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants