Skip to content

test: repair three baseline Vitest failures - #276

Merged
salman1993 merged 1 commit into
mainfrom
fix-baseline-vitest
Sep 25, 2026
Merged

salman1993 merged 1 commit into
mainfrom
fix-baseline-vitest

Conversation

@salman1993

Copy link
Copy Markdown
Contributor

Summary

Repair three stale Vitest expectations/fixtures already failing on freshly fetched origin/main (confirmed at a7a57274, then rebased onto 17de590f). No product behavior changes.

  • Plugin import: expect the current enabled-update copy, including its safe-mode qualification.
  • Message row: the presence-only partial session fixture predates session.messages.report; supply its missing messages member.
  • Profile identity: the public metadata hook now reads kind 10100 on the profile itself. Assert all three expected reads (kind 0, 30315, 10100) and no owner read rather than expecting only two.

Overlap: Open PR #271 independently repairs the message fixture and profile assertion; #273 adjusts the profile assertion by filtering other reads. This focused PR fixes all three baseline failures together so the existing Vitest gate can pass; coordinate to avoid duplicate merges/conflicts.

Validation

  • Before fixes, the three named tests failed on fetched origin/main (a7a57274), 57/60 targeted tests passing.
  • At 3b3bbb9c22b7431502a5ee683b19208f1d7a6514 (base 17de590f): full bin/pnpm exec vitest run — 360 files / 3945 tests passed; bin/pnpm check — passed; repository check-staged and check-push groups — passed (pre-push related 4 files / 61 tests). git diff origin/main...HEAD --check clean.
  • Browser/native/live-relay checks not run: test-only corrections; CI is pending.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T18:33:41.392819Z 3b3bbb9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b3bbb9c22

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +99 to +100
screen.getByText(
/stays on and may run immediately unless this launch is in safe mode/,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add the required DCO sign-off

The reviewed commit message contains no Signed-off-by: trailer, so it cannot satisfy the repository's per-commit DCO requirement and the hosted DCO check will reject it. Have the actual author certify the commit with their verified Git identity before including it in the PR.

AGENTS.md reference: AGENTS.md:L153-L163

Useful? React with 👍 / 👎.

expect(screen.queryByRole("region", { name: "Agent identity" })).toBeNull();
const reads = query.mock.calls.flatMap(([filters]) => filters);
expect(reads).toHaveLength(2);
expect(reads).toHaveLength(3);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Wait for the metadata read before counting queries

When React schedules the profile load ahead of the metadata view's separate bind-and-refresh effects, finding the Person heading only proves that profiles.ensure completed; it does not prove that the kind-10100 query has started. Capturing query.mock.calls immediately can therefore still see two reads and intermittently fail this new exact-length assertion. Wait for the 10100 call or another metadata completion barrier before taking the snapshot and asserting the absence of owner reads.

AGENTS.md reference: AGENTS.md:L135-L141

Useful? React with 👍 / 👎.

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Carl, an automated reviewer, commenting via Wes’s GitHub account.

No blocking introduced defects found. Comment only, not approval.

Reviewed head 3b3bbb9c22b7431502a5ee683b19208f1d7a6514 against base 17de590f1d574a9a7f2d9af218edfe75fc6f8caa. The three test-only corrections preserve their assertions while matching current plugin copy, optional reporting capability, and self-authored profile metadata reads. There is no product-code change.

The missing-sign-off comment does not apply to this head: its commit contains Signed-off-by: Salman Mohammed <smohammed@squareup.com> and hosted DCO passes. The metadata-query race is not established for this fixture: RTL render flushes the metadata binding/refresh effects, and the reader reaches the query mock synchronously. An explicit metadata-read barrier could clarify intent, but I found no concrete failure requiring changes.

Validation: complete diff/caller inspection plus independent profile-sequencing review; existing CI run 36170857556 passed the exact head/base merge, including 360 Vitest files / 3,945 tests and the required native/browser lanes. I did not rerun CI-equivalent suites locally. The independent reviewer reported one unidentified failure during repeated full-file stress runs; without its assertion/log, it cannot establish a defect in this change, nor do those runs establish a flake-free file. Coordinate overlapping fixture repairs in #271/#273 before merging.

Signed-off-by: Salman Mohammed <smohammed@squareup.com>
@salman1993
salman1993 merged commit 8d05fcf into main Sep 25, 2026
14 checks passed
@salman1993
salman1993 deleted the fix-baseline-vitest branch September 25, 2026 19:48
johnmatthewtennant pushed a commit that referenced this pull request Sep 28, 2026
* origin/main:
  feat: attach sanitized image and opt-in diagnostics to feedback (#245)
  test: repair three baseline Vitest failures (#276)
  fix(agents): recover status polling and scope failure diagnostics (#283)
  Share avatar editing across community profiles and managed agents (#271)
  feat(profiles): archive, unarchive and delete agents from the profile pane (#256)
  ci: run browser journeys on three shards per engine (#280)

Signed-off-by: Sol <49aa1f65411fd096d2e2ec144f1e7aa36fdc76d1b907cfdf7be000c66f9d3b8e@buzz.block.builderlab.xyz>

# Conflicts:
#	src/bundled/agents/AgentEditor.tsx
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