Repository navigation
Unbreak main twice over, and work four issues behind it - #112
Merged
Merged
Conversation
… warning gate refused the old import `main` has failed its backend job on every push since #106 raised anyio to 4.15.1: `anyio.abc.BlockingPortal` is deprecated there, starlette 1.6.0 still imports it in `testclient.py`, and `filterwarnings = ["error"]` turns that import into a collection error in `tests/api/test_events_ws.py` before a single test runs. Both open Dependabot pull requests fail on the same line. starlette 1.7.0 imports the portal from `anyio.from_thread`. The comment in `constraints.txt` records why an ignore was refused: it would pass the gate while leaving the farm on a version the next anyio actually breaks. Verified: `tests/api/test_events_ws.py` 14 passed; the full suite 1 619 passed, 7 skipped, exit=0 in 1687.95s; all six gates exit=0. Co-Authored-By: Claude Fable 5.1 <[email protected]>
) `scheduler_tick_seconds`, `sla_sweep_seconds` and `telemetry_poll_seconds` are handed to their loops once in `workers/runner.py`; their neighbours on the settings screen resolve at the read edge and take effect on save. The screen gave no sign of the difference, so an owner saw the audit row and concluded the change had taken. The hint now states it, in both catalogues, and the new `SettingsPage` test pins that each of the three carries it in its own section. Reverting the catalogue change fails that test (run). The hot reload itself stays deferred, as the issue says. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Closes #12. `docs/DEVELOPMENT.md` listed `[email protected]` / `shop-floor-pass-1` and a fixed owner password; nothing in the repository creates the first or sets the second. Verified against a freshly created database: `alembic upgrade head` (0001 -> 0026), `provision_with` with the password `owner-pass-12345`, then `POST /auth/sign-in` through Starlette's TestClient - `boss@` 200, `floor@` 401 `error.identity.invalid_credentials`, and `SELECT email, role FROM users` returns the one owner row. The table now says the owner's password is whatever was typed at the prompt and the second account is made in the console with the role the gate being checked needs. The role decision the issue flagged as needs-person is not made: the document no longer asserts one. Co-Authored-By: Claude Fable 5.1 <[email protected]>
… cannot be scored (#34) The last clause of #34's "done when": the supplier scorecard computes from delivered purchase orders rather than being typed in. `supplier_scores` groups orders by supplier with three FILTER counts on one join - reached STORED, of those the ones that carried an expected_at, of those the ones on the shelf by that date. `on_time_share` is on_time / dated, and null when nothing was dated: an undated delivery is neither punctual nor late, and counting it either way moves the score for every date a buyer did not type. Three of the kit's six columns are deliberately absent, each for a reason the schema docstring records: a defect share needs a rejected quantity no receipt records and would read 0% for everyone; turnover is money the board never carries; a composite rating is a policy nobody has written. `test_purchasing_api.py` crossed the 400-line gate with the API test for this and is split at its seam: `_purchasing_support.py` (helpers, no fixtures - the `_catalog_support.py` rule) and `test_purchasing_scorecard_api.py`. Verified: nine unit tests and two API tests; four mutations each fail at least one - RECEIVING counted as delivered (1), deliveries as the denominator (2), 0 for an undated share (3), every dated delivery on time (1). The screen test draws the share with its counts and an em dash where nothing was dated. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This was referenced Sep 24, 2026
…ot yet #105 raised vitest to 5.0.0 with its frontend check red, and nothing on main noticed because the backend job ahead of it was already failing on another bump. Vitest 5 made `Assertion<T>` into `Assertion<R, T>`; jest-dom 7.0.1 augments the one-parameter shape, the merge silently fails under `skipLibCheck`, and a clean `tsc --build` reports 208 TS2339 errors across every test file while the suite runs green - the runtime half still works. `frontend/types/jest-dom-vitest.d.ts` augments vitest's documented `Matchers<R, T>` extension point with jest-dom's matchers, in the parameter order jest-dom's own pending fix uses (testing-library/jest-dom#742). The four project tsconfigs include it. Delete both when jest-dom ships #742. Verified from a lockfile install: `tsc --build --force` 208 errors without the file, 0 with it; `lint`, the whole vitest run (33 files, 317 passed) and `build` each exit=0. HANDOFF records the trap: `npm run typecheck` passed on this tree because stale `*.tsbuildinfo` skipped the check. Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.
Why
mainis red, and the one-line fixmainhas failed its backend job on every push since #106 (2026-09-09). That PR raisedanyioto 4.15.1, which deprecatesanyio.abc.BlockingPortal;starlette1.6.0 still imports it from there intestclient.py, andfilterwarnings = ["error"]turns the import into a collection error intests/api/test_events_ws.py— pytest exits 2 before running a test. Both open Dependabot PRs (#110, #111) fail on that same line, including the frontend one, which is what marks it as amainproblem. #106 merged red because branch protection (#67) is not on.Fix:
starlette==1.7.0inbackend/constraints.txt(released 2026-09-23; imports the portal fromanyio.from_thread). The comment in the file records why afilterwarningsignore was refused. After this merges, #110 and #111 need@dependabot rebase.The second break, hidden behind the first
Once the backend job passed, the frontend job ran on
main's tree for the first time since #105 (vitest 4.1.11 → 5.0.0, merged red) and failedTypeswith 208TS2339errors: vitest 5 changedAssertion<T>toAssertion<R, T>and jest-dom 7.0.1's augmentation no longer merges (jest-dom's fix, testing-library/jest-dom#742, is unreleased).frontend/types/jest-dom-vitest.d.tsbridges it through vitest'sMatchers<R, T>extension point; delete it and the fourtsconfig.jsonincludes when jest-dom ships. Verified from a lockfile install:tsc --build --force208 errors without, 0 with;lint, full vitest (33 files, 317 passed) andbuildexit 0. Notenpm run typecheckalone passed on a staletsbuildinfo— HANDOFF records that trap.Issues worked in the same branch
purchasing.html— noSupplier, noPurchaseOrder, nothing #34 — supplier scorecard, computed.procurement.reads.supplier_scoresgroups orders by supplier with threeFILTERcounts (deliveries= reachedSTORED,dated= of those with anexpected_at,on_time=stored_at <= expected_at).policies.on_time_shareis null when nothing was dated — an undated delivery is neither punctual nor late. «Брак», «Оборот» and «Оценка» are deliberately absent (unmeasured / money the board never carries / undefined composite); the schema docstring says so. Board panel «Поставщики» on the purchasing screen.test_purchasing_api.pycrossed the 400-line gate and was split at its seam (_purchasing_support.py,test_purchasing_scorecard_api.py).scheduler_tick_seconds,sla_sweep_seconds,telemetry_poll_secondsin both catalogues;SettingsPage.test.tsxpins each in its own section and fails when the catalogue change is reverted (run). The hot reload stays deferred.docs/DEVELOPMENT.mdno longer publishes credentials nothing seeds. Verified on a fresh database (CREATE DATABASE→alembic upgrade head→provision_with→POST /auth/sign-in):boss@200 with the password typed at provisioning,floor@401invalid_credentialsbecause no row exists. The role decision the issue flagged is not made: the document no longer asserts one.Verified
Backend, each run separately and each
exit=0:ruff check,ruff format --check,mypy --strict(255 source files),lint-imports(6 kept, 0 broken),check_context_isolation.py,check_file_length.py.Full backend suite on this tree: 1 619 passed, 7 skipped,
exit=0in 1687.95s (started before the scorecard tests existed; those plus the split purchasing API tests and the two #58 intake files then ran in one further session: 28 passed,exit=0).Frontend, from
npm cion the lockfile:tsc --build --force,lint,test(33 files, 317 passed) andbuildeachexit=0.Mutations run and reverted: counting
RECEIVINGas a delivery (1 scorecard test fails), deliveries as the denominator (2),0for an undated share (3), every dated delivery on time (1); reverting the settings-hint catalogue change fails the newSettingsPagetest.HANDOFF.md carries the session record.
🤖 Generated with Claude Code