Skip to content

Green main: fix the scaffold settings fixture, make two tests Windows-portable - #281

Merged
turinglambdaai merged 4 commits into
mainfrom
fix/windows-host-test-portability
Oct 17, 2026
Merged

turinglambdaai merged 4 commits into
mainfrom
fix/windows-host-test-portability

Conversation

@turinglambdaai

Copy link
Copy Markdown
Owner

Summary

The full suite has failed 1/10017 on every platform since #271 landed, so main went red on the merge commit itself. Reproduced and fixed locally on a Chinese-locale Windows 11 machine (Racket CS 9.0, 10011/10011 after both commits).

1. The red-main failure: updater-scaffold.rkt fixture (make-hasheq + string keys)

The fake settings store used make-hasheq. Racket interns string literals per module, so the "update.rollout-bucket" literal inside rivet/distribution/updater-scaffold.rkt and the one inside the test are eq?-distinct objects:

  • resolve-rollout-bucket! persists the draw under its own literal; the test's read-back with its own literal misses (stored=#f) — this is the CI failure at updater-scaffold.rkt:176.
  • The sticky assertion (resolve returns first-bucket after the direct "42" write) only ever passed because the direct write landed in a third, invisible slot. Under correct equal? semantics a valid "42" write is the recovered value, so the block's final expectation contradicted the documented semantics and had to change.

Fixture is now make-hash; the sticky block asserts the documented behavior (draw persisted, draw recovered, direct valid write recovered). The diagnostic eprintf that leaked in is gone.

2. Windows-host portability (fails on any Windows dev machine, invisible on CI's Linux)

  • inspect.rkt: project-report returns path->string output; the expectation now builds the path so separators follow the host instead of hardcoding /.
  • linux-native-installer.rkt: Unix permission bits do not exist on NTFS (everything reports 0o777); the 0o755 maintainer-script assertion now runs on POSIX only.

Test plan

  • raco test rivet/tests/updater-scaffold.rkt — 47 passed
  • raco test rivet/tests/ — 10011 passed, 0 failures (Windows 11, GBK code page)
  • CI on all legs

The fake settings store used make-hasheq with string keys. Racket interns
string literals per module, so the production key from
resolve-rollout-bucket! never matched the test's literal: the draw
persisted into a slot the test's read-back could not see, and the sticky
assertion only held because the direct writer write landed in a third
slot. Every platform failed 1/10017; main has been red since #271.

Switch the fixture to make-hash and rewrite the sticky block to assert
what the documented semantics promise: the draw is recovered, and a valid
value written directly through the adapter is what the next run
recovers. Drop the diagnostic eprintf that leaked in with the block.
project-report returns path->string output, so the AgentDemoApp
expectation needs host separators, not hardcoded forward slashes; and
Unix permission bits do not exist on NTFS, where everything reports
0o777, so the 0o755 maintainer-script assertion only runs on POSIX.

Together with the previous commit the full suite passes on a
Chinese-locale Windows 11 machine: 10011/10011.
The release-gate fixture wrote the snapshot to a cwd-relative path, and
raco test runs each file with its own directory as cwd, so every full
suite run left rivet-schema.json behind in rivet/tests/ — invisible on
CI (untracked) but littering every developer checkout. The project-root
path is also what the doctor's own advice tells downstreams to commit,
so the green-path fixture now matches reality; the temp project is
deleted in the existing dynamic-wind cleanup.
…faced

Every sibling Windows project (the example and scaffold hosts, chart,
device smoke) already passes /utf-8; only the static library the hosts
link was missing it. On a CJK-locale machine MSVC then reads the UTF-8
sources in the system code page and drowns the build in C4819 (18 on a
plain fulcrum raco rivet build), with real data-loss risk for any
non-ASCII literal.

With /utf-8 the remaining warnings are two C4244s in <xutility>
instantiations and a C4456 pair in device_session_host.cpp where the
expiry branch redeclared saw_acceptance/saw_close over the enclosing
scope — renamed to expired_acceptance/expired_close, semantics
unchanged.
@turinglambdaai
turinglambdaai merged commit 7adc2bd into main Oct 17, 2026
23 checks passed
@turinglambdaai
turinglambdaai deleted the fix/windows-host-test-portability branch October 17, 2026 12:13
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.

1 participant