Skip to content

fix(v6.51.2): green test suites; bad .eap upload is a 400 (ADR-254, #307) - #308

Merged
cgbarlow merged 2 commits into
mainfrom
fix/pre-existing-test-failures
Sep 27, 2026
Merged

cgbarlow merged 2 commits into
mainfrom
fix/pre-existing-test-failures

Conversation

@cgbarlow

Copy link
Copy Markdown
Owner

Summary

Fixes every test failure that was already on main (listed in #307). CI runs only the parity, genericness and extensions checks, which is why these went unnoticed.

Stale tests (9). Each one pinned behaviour that a later release changed on purpose. Every test now asserts the current design and names the release that changed it. No product code changed for these.

  • Frontend (7): canvasTabFirst, extensionManagerFields, hierarchyControls ×2, textViewTocToggle, umlRendering, viewsToolbarOrder
  • MCP (2): create_element and create_element_template required fields (v6.8.0 / ADR-211)

Drifting test schemas (13). The search and mnemos tests built their database from a hand-picked list of migrations, or a hand-written table, that had fallen behind the real schema. The new run_sqlite_main_migrations(conn) in app/startup.py is the ordered list startup already ran. Startup and these tests now both call it, so the test schema can't drift again.

One real bug (2). convert_eap_to_sqlite checked for mdbtools before validating the file, so on a host without mdbtools a non-JET4 .eap upload returned 500 instead of 400. The header check now runs first. Production installs mdbtools, so the hosted service wasn't affected.

Tests that weren't running (8). tests/test_startup.py clashed with the tests/test_startup/ package (added in v6.30.2), so the suite had to be run with --ignore and these 8 tests were skipped. The file has moved to tests/test_startup/test_initialize_databases.py, and all 8 pass.

Dev disk. A full backend run leaves about 1.4 GB of SQLite files, and pytest keeps 3 runs, which filled the 7.8 GB tmpfs /tmp in the dev container. The new tmp_path_retention_policy = "failed" keeps temp folders only for failed tests.

Also: ADR-254, SPEC-254-A, CHANGELOG, and a version bump to 6.51.2.

Closes #307

Test plan

  • Frontend vitest: 1321 passed (was 7 failed)
  • MCP pytest: 288 passed (was 2 failed)
  • Backend pytest, no --ignore: 2224 passed, 9 skipped (was 15 failed, 8 not collected); /tmp/pytest-of-vscode is 1.9 MB afterwards
  • CLI pytest: 70 passed. No code change; locally cli/.venv needed editable installs of iris-client, mcp and backend
  • scripts/check_surface_parity.py and scripts/check_aggregation_genericness.py are clean
  • Not addressed: about 167 svelte-check type errors, mostly in test files

🤖 Generated with Claude Code

https://claude.ai/code/session_01EbTwcTX1wKVooS7oWd7cP9

Chris Barlow and others added 2 commits September 24, 2026 10:05
Each test pinned a behaviour that a later release changed on purpose;
the product code is unchanged.

Frontend (vitest, 7):
- canvasTabFirst: ADR-204 moved the Text-view hasContent heuristic past
  the 400-char window; match the isText..hasContent block instead.
- extensionManagerFields: the source link goes through
  effectiveSourceUrl() since v5.5.5.
- hierarchyControls, viewsToolbarOrder: v6.17.0 (#194) replaced
  HierarchyControls on /views with a single New View button, and made
  the create callbacks optional. Assert the current design (package page
  still uses HierarchyControls; New View precedes Select).
- textViewTocToggle: allow the `(canvasType as string)` cast.
- umlRendering: ADR-234 gives EA fixed-size nodes an exact height +
  clip; authored nodes keep min-height. Test the function, both cases.

MCP (pytest, 2):
- create_element: element_type/name optional since v6.8.0 templates.
- create_element_template: only name required since ADR-211 (v6.19.0).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EbTwcTX1wKVooS7oWd7cP9
)

- run_sqlite_main_migrations(): the ordered migration list startup
  already ran, now shared with tests that build their own DB. The search
  and mnemos tests used hand-picked subsets that had drifted (13 fails).
- eap_converter: validate the JET4 header before checking for mdbtools,
  so a non-JET4 upload is a 400 on every host, not a 500 where mdbtools
  is missing (2 fails).
- Move tests/test_startup.py into the tests/test_startup/ package; its
  module name clashed, so its 8 tests had not been collected.
- pytest tmp_path_retention_policy = "failed": a full run leaves ~1.4 GB
  of SQLite files and 3 kept runs filled the tmpfs /tmp.
- ADR-254, SPEC-254-A, CHANGELOG.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EbTwcTX1wKVooS7oWd7cP9
@cgbarlow
cgbarlow merged commit 4c76dfa into main Sep 27, 2026
1 check passed
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.

Test suites: pre-existing failures across frontend, backend, MCP and CLI

1 participant