Repository navigation
fix: follow-up for #146 (CI, test record, pins README) - #174
Conversation
a_server_that_stops_reading_ends_the_request_by_the_deadline built a 64 MB body and timed the whole post(). post() serialises the body inside the request deadline, and a debug build takes about 4 s to serialise 64 MB, so the test saw 4.2 s for a request that ends at its 500 ms deadline. Change: the body is 16 MB, still larger than the loopback socket buffers, and the elapsed bound is 3 s. The server releases the socket after 4 s, so a request that ignored its deadline still fails the bound. Checks, run on the aarch64 Linux host against a copy of this tree: - cargo fmt --check: exit 0 - cargo clippy -- -D warnings: exit 0 - cargo test --no-fail-fast: 598 passed, 1 failed, 17 ignored. The paging test passes. The one failure is proc::tests::a_pid_that_does_not_exist_signals_nothing_and_does_not_panic, which also fails on the base commit (pre-existing, not changed here).
Tests/Fixtures/README.md tells the reader how to re-record the Playwright fixture with an isolated npm ci: --ignore-scripts, --userconfig, --globalconfig, --cache, --registry https://registry.npmjs.org/ and HOME. Those are the same settings run_smoke passes in scripts/playwright-pins.py. The README already had them. Nothing checked that they stayed there. Change: FixtureReadme checks that the README names each setting, and that run_smoke still passes the flags. Removing --cache from the README makes the new test fail; restoring it makes the test pass. Checks, run on the aarch64 Linux host against a copy of this tree: - python3 scripts/test-playwright-pins.py: 54 tests OK, playwright pins: ok (offline) - python3 scripts/test-playwright-pins.py FixtureReadme on a copy with --cache removed from the README: FAILED (failures=1); restored copy: OK
|
Important CHANGES REQUESTED What This PR DoesFollow-up fixes for #146, which merged before CI and review finished. It retunes a flaky Rust deadline test (64 MB -> 16 MB body, 1.5 s -> 3 s bound) and adds Python tests meant to keep the How It Works
Findings
Finding Details🟡 F1: README guard does not check the
|
| Reviewer | Verdict | Key points |
|---|---|---|
| Reviewer A (architecture) | Changes requested | F1, F2, F3, F4; prefers a shared command-builder over text search |
| Reviewer B (correctness) | Changes requested | F1, F2 (full flag set), F3 (measurement), F4 |
| Reviewer C (security/CI) | Changes requested | F1, F2 (strings also in generate()), F3; no auth, secret, or dependency concerns |
No external reviewer feedback on this PR yet.
5. Three Reasons We Might Not Need This PR
- The guards can give false confidence - as written, both new tests can pass after the command they protect has drifted, which may be worse than having no test.
- Text-search tests add coupling without proof - they tie the tests to source formatting but do not prove that the README and
run_smokerun the same command. A shared helper would remove the need for them. - The Rust change only tunes one test - its value depends on fixing F3. Otherwise it trades one timing problem for another in debug builds.
The FixtureReadme checks matched flags anywhere in their file. The run_smoke check was a whole-file substring match, and --userconfig, --globalconfig, --ignore-scripts and --cache also occur in the lockfile-generation call, so removing them from run_smoke still passed. - run_smoke: parse playwright-pins.py with ast, find the subprocess call that runs npm ci inside run_smoke, and require the four flags on that call and a HOME key in the env dict assigned inside run_smoke. - README: take the logical command that contains npm ci (with its line continuations) from the fenced block and require the flags, HOME= and the registry on that command only. This also covers the low finding that the README check was a whole-document substring match. - Low finding on the paging test bound (3 s): not changed here. A safe bound needs a measurement on the CI runner, and the change would be to a Rust test that this step did not otherwise touch. Tests added: removing each of the four flags from the README command, from the run_smoke npm ci call, and removing HOME from the run_smoke env fails its test. The current README and run_smoke pass. Verification run for this commit: - python3 scripts/test-playwright-pins.py FixtureReadme: 5 tests, OK. - python3 scripts/test-playwright-pins.py: 57 tests, OK; playwright pins offline check ok. - Mutation, file level, one flag at a time in a scratch copy: each of --userconfig, --globalconfig, --ignore-scripts, --cache removed from the run_smoke npm ci call fails FixtureReadme; the same four removed from the README command fail; HOME removed from the run_smoke env fails. Unmodified copy: OK. - swift build (macOS build host, scratch copy under /private/tmp): complete. - swift test: 852 executed, 0 failures, 5 skipped. - Rust: skipped, no .rs or Cargo file changed.
Context
This PR follows the merge of #146 at
3f6afbetomainon 2026-11-19. That PR merged before its CI and council review were complete. The owner chose to keep it and fix forward. This PR carries those follow-up fixes.Fixes
6366a05fix(linux): paging deadline test measured its own serialisation. The test built a 64 MB body and timedpost(), which serialises the body inside the request deadline. On a debug build that took about 4 s, so the test failed even though the request ended at its 500 ms deadline. The body is now 16 MB, still larger than the socket buffers, and the bound is 3 s. The server releases the socket after 4 s, so a request that ignored its deadline still fails.d29d8e6test(pins): guard the README npm ci isolation settings.Tests/Fixtures/README.mdalready had--ignore-scripts,--userconfig,--globalconfig,--cache,--registry https://registry.npmjs.org/andHOME=, matchingrun_smoke. Nothing enforced that.FixtureReadmenow fails when one of these settings is removed from the README (checked on a copy). It also checks thatrun_smokestill passes the flags.Files changed:
poc/reverse-attach-linux/src/external_tests.rs,scripts/test-playwright-pins.py.Verification at head
d29d8e6c4ae9277aed8a0f3c7571af8533fffe01Both runs used
git archive HEAD. These are local runs. No CI run exists for this commit, so this PR does not have a CI pass.Swift (Apple Silicon build host)
swift build:Build complete!, exit 0.swift test:Executed 852 tests, with 5 tests skipped and 0 failures (0 unexpected), exit 0.WizardSnapshotTests(testBrowserStates,testWizardPages) skip unlessOAB_SNAPSHOT_DIRis set. The other three are skipped inside other suites.Rust (aarch64 Linux host)
cargo fmt --check: exit 0, no diffs.cargo clippy -- -D warnings: exit 0, clean.cargo test --no-fail-fast: 598 passed, 1 failed, 17 ignored.proc::tests::a_pid_that_does_not_exist_signals_nothing_and_does_not_panic. It panics atassertion failed: raw >= 0in rustix 1.1.6src/pid.rs:44. Pre-existing: it also fails on the base commit, so this PR does not introduce it and does not fix it.install::tests: none failed.cargo test pagingruns.Python (aarch64 Linux host)
scripts/test-playwright-pins.py: 54 tests OK.Head
d29d8e6c4ae9277aed8a0f3c7571af8533fffe01