Skip to content

test(server): fix 7 stale test failures surfaced by the CI migration - #267

Merged
dwinter3 merged 1 commit into
mainfrom
fix/server-backend-test-failures
May 15, 2026
Merged

test(server): fix 7 stale test failures surfaced by the CI migration#267
dwinter3 merged 1 commit into
mainfrom
fix/server-backend-test-failures

Conversation

@dwinter3

Copy link
Copy Markdown

The new 8th-layer-agent-ci CodeBuild gate (#168) made main's already-red server test suite visible. All 7 failures were stale tests, not product bugs — the features shipped correctly; their tests weren't updated.

Test-only changes; no production code touched. Full server suite verified: 858 passed, 5 skipped, 0 failed.

🤖 Generated with Claude Code

The new CodeBuild CI gate (#168) made main's red server suite visible.
All 7 failures were stale tests, not product bugs — features shipped
correctly, their tests just weren't updated:

- HEAD_REVISION pins (3 files: test_default_enterprise_backfill,
  test_migration_0011_activity_log, test_migration_0015_*) hardcoded
  "0023_persona_assignment_audit". Migration 0024_user_tour_state
  (founder tour, #254) correctly bumped HEAD_REVISION; the test pins
  didn't follow. Bumped to 0024 + de-staled the comments.
- test_queries TestUserHelpers — raw INSERT_USER param dicts omitted
  `role` (the column the role-propagation fix #252/#253 added to the
  INSERT), and the SELECT row indices still assumed the pre-role column
  order. Added role to the dicts; fixed row[3]/row[4] indexing.
- test_review test_get_requires_auth — _propose() logs in, persisting
  the cq_session cookie in the TestClient jar; since cookie auth
  landed, that cookie authenticates the "no header" request. Clear the
  jar so it exercises the genuine unauthenticated path.

Full server suite: 858 passed, 5 skipped, 0 failed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dwinter3
dwinter3 merged commit 82995d7 into main May 15, 2026
dwinter3 added a commit that referenced this pull request May 15, 2026
test_unsigned_event_when_no_key_available simulated "no signing key"
by pointing CQ_AIGRP_L2_PRIVKEY_PATH at a chmod-000 directory. Root
bypasses directory permissions, so under CodeBuild (containers run as
root) the key got created, the event was signed, and the NULL-signature
assertion failed — the one CI failure left after #267.

Disable signing deterministically instead: monkeypatch
forward_sign.load_or_create_l2_privkey to return None, then reload.
Behaves identically as root or non-root.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant