Skip to content

Fail smoke tests when fixture cleanup fails - #650

Merged
robzolkos merged 2 commits into
mainfrom
harden-smoke-tests
Nov 13, 2026
Merged

robzolkos merged 2 commits into
mainfrom
harden-smoke-tests

Conversation

@robzolkos

@robzolkos robzolkos commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Smoke tests could pass after cleanup failed, or draft a reply against an unrelated inbox thread. This ties fixtures to their created IDs, checks cleanup and readbacks, and isolates CLI subprocess state, including setup failures.

It also adds private command evidence and 22 offline harness regressions, with a CI step that needs no HEY server, browser or login. No verification skill, feature map or product behavior changes; no action needed for CLI users.

Verification

  • 22 offline regressions passed with race detection; verification-tagged compilation passed too.
  • 22 selected strict live tests passed against local Haystack with local-only SMTP capture, no skips, and cleanup readbacks. Temporary browser files were removed after the run; private evidence is not uploaded.
  • Full unit tests passed in a same-user isolated loopback network to keep host probes out of HTTP fixtures. Formatting, actionlint and an independent read-only review passed.

Contacts remain hidden rather than deleted. Other legacy smoke tests and abnormal-exit cleanup retain the limits documented in the smoke README.

Keep reply and thread fixtures tied to their created topic IDs. Check cleanup mutations and readbacks, isolate all CLI subprocess state, and preserve private command evidence.

Exercise fixture selection, cleanup failures, retries, partial observations, environment isolation and evidence privacy in offline harness regressions, and run those separately in CI without a HEY server. No verification skill or product behavior changes.
@robzolkos
robzolkos requested a review from a team as a code owner November 13, 2026 19:30
Copilot AI balanced review requested due to automatic review settings November 13, 2026 19:30
@github-actions

Copy link
Copy Markdown

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .github/workflows/test.yml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 11 files

You’re at about 94% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread tests/smoke/helpers_test.go Resolved
Comment thread tests/smoke/threads_test.go Resolved
Comment thread tests/smoke/events_test.go Resolved

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.

🟡 Changes recommended

Relative HEY_BINARY overrides can fail after subprocess working-directory changes, and cleanup checks can falsely pass by missing events on disabled calendars.

2 open issues
What changed in this PR

This PR strengthens the smoke-test harness so fixture cleanup failures fail tests, and reply fixtures use their created topics rather than unrelated inbox threads. It changes test infrastructure only, not CLI product behavior.

Changes:

  • Adds checked cleanup and readbacks for drafts, threads, contacts, and events.
  • Isolates CLI subprocess state and optionally records private command evidence.
  • Adds 19 offline harness regressions and a dedicated CI step.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
tests/​smoke/​threads_test.go Ties long-thread fixtures to created topic IDs.
tests/​smoke/​README.md Documents offline tests, evidence privacy, and cleanup limits.
tests/​smoke/​helpers_verification_test.go Adds cleanup readbacks, fixture lookup, and command evidence helpers.
tests/​smoke/​helpers_test.go Isolates subprocess state and cleans up after setup failures.
tests/​smoke/​helpers_regression_test.go Adds 19 offline harness regressions.
tests/​smoke/​events_test.go Checks event and split-series cleanup.
tests/​smoke/​draft_lifecycle_test.go Checks draft cleanup and uses owned reply topics.
tests/​smoke/​cookie_verification_test.go Runs watch from the isolated working directory.
tests/​smoke/​contacts_test.go Registers checked contact cleanup with avatar baselines.
tests/​smoke/​config_test.go Uses the isolated CLI environment and working directory.
.github/​workflows/​test.yml Runs offline harness regressions with race detection.

Review effort: Balanced

Comment thread tests/smoke/helpers_test.go Resolved
Comment thread tests/smoke/helpers_test.go Resolved
Comment thread tests/smoke/helpers_regression_test.go Resolved
Use all-calendar event lists for split discovery and cleanup readbacks. Resolve relative binary overrides before changing child working directories, make permission regressions independent of umask, and keep caller HEY settings out of isolated child CLIs. HEY_SMOKE_ACCOUNT_ID explicitly selects a linked development account.

Add regression coverage for hidden-calendar splits, relative binary paths and explicit account scoping, and include fixture identities in missing-ID errors for manual recovery.

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 7 files (changes from recent commits).

You’re at about 95% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

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.

🟢 Approved

No unresolved review issues are recorded for the smoke-test harness changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@robzolkos

Copy link
Copy Markdown
Contributor Author

CI is green at c11113f. All automatic reviewers have reported on that head, and no review threads remain unresolved. The 22 offline harness regressions pass, including restrictive-umask/race checks; all 22 selected strict live cases passed against local development Haystack with local SMTP capture and cleanup readbacks.

One suggestion was declined: invalid fixture windows still fail before mutation. Every caller supplies ISO literals or formatted dates, and a valid window is required to discover split series and prove complete cleanup. Invalid metadata stays a failed test, with fixture details for recovery—not a passing cleanup result.

No verification skill or product behavior changes are included. The PR remains open; auto-merge is not enabled.

@robzolkos
robzolkos merged commit d585bd3 into main Nov 13, 2026
26 checks passed
@robzolkos
robzolkos deleted the harden-smoke-tests branch November 13, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants