Repository navigation
fix(v6.51.2): green test suites; bad .eap upload is a 400 (ADR-254, #307) - #308
Merged
Merged
Conversation
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
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.
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.
canvasTabFirst,extensionManagerFields,hierarchyControls×2,textViewTocToggle,umlRendering,viewsToolbarOrdercreate_elementandcreate_element_templaterequired 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)inapp/startup.pyis 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_sqlitechecked formdbtoolsbefore validating the file, so on a host withoutmdbtoolsa non-JET4.eapupload returned 500 instead of 400. The header check now runs first. Production installsmdbtools, so the hosted service wasn't affected.Tests that weren't running (8).
tests/test_startup.pyclashed with thetests/test_startup/package (added in v6.30.2), so the suite had to be run with--ignoreand these 8 tests were skipped. The file has moved totests/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
/tmpin the dev container. The newtmp_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
--ignore: 2224 passed, 9 skipped (was 15 failed, 8 not collected);/tmp/pytest-of-vscodeis 1.9 MB afterwardscli/.venvneeded editable installs ofiris-client,mcpandbackendscripts/check_surface_parity.pyandscripts/check_aggregation_genericness.pyare clean🤖 Generated with Claude Code
https://claude.ai/code/session_01EbTwcTX1wKVooS7oWd7cP9