test(server): fix 7 stale test failures surfaced by the CI migration - #267
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The new
8th-layer-agent-ciCodeBuild gate (#168) mademain'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_default_enterprise_backfill,test_migration_0011_activity_log,test_migration_0015_*each hardcodeassert HEAD_REVISION == "0023_persona_assignment_audit". Migration0024_user_tour_state(founder tour, feat(tour): in-app founder walkthrough (8 steps) + server-side persistence #254) correctly bumped theHEAD_REVISIONconstant; the test pins didn't follow. Bumped to0024, de-staled the comments.test_queriesTestUserHelpers (2) — the rawINSERT_USERparam dicts omittedrole(the column the role-propagation fix fix(auth): /auth/me + admin routes accept cq_session cookie (closes login 401) #252/fix(auth): propagate invite role to users.role + accept FO-1b admin taxonomy #253 added), and theSELECT_USER_BY_USERNAMErow indices still assumed the pre-rolecolumn order. Addedroleto the dicts; fixedrow[3]/row[4]indexing.test_review::test_get_requires_auth(1) —_propose()logs in, persisting thecq_sessioncookie in the TestClient jar. Since cookie auth landed, that cookie authenticates the "no header" request → 200. Clear the jar so the test exercises the genuine unauthenticated path → 401.Test-only changes; no production code touched. Full server suite verified: 858 passed, 5 skipped, 0 failed.
🤖 Generated with Claude Code