14 Commits
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
ec56c1da04 |
fix(setup): preserve registration identity and recovery ownership
Keep layered environment choices, current byte-exact recovery snapshots, and package-manager failure details. Report pinned package drift without claiming runner resolution. Retain failed Linux installer cleanup for host-owned retry while preserving the install outcome. Reviewed fixes include #2632, #2769, #2783, #2959, #2979, #2983, #2995, #3009, and #2559. Validation: 98 focused setup/registration tests passed; 45 Linux installer tests passed. Real Linux package installation remains unverified. |
|
|
|
8b1549a264
|
test: share repeated boundary preambles to restore the jscpd gate (#2691)
Squash merge of https://github.com/morluto/rea/pull/2691. Co-authored-by: NIU-123370 <191000457+NIU-123370@users.noreply.github.com> |
|
|
|
8b181716ac |
fix(install): honor redirected setup diagnostics
Require terminal stderr before launching the automatic setup wizard, matching the CLI's interactive admission rule. Print the manual setup command when diagnostics are redirected. Exercise a real PTY with stderr redirected to a fixture file and verify the installed command is not launched for setup. Installer lane: 33 tests passed; targeted regression, typecheck/lint and npm pack dry-run passed. Full package verifier was not run under the requested focused-check resource policy. |
|
|
|
428eee00fd
|
ci: keep validation fresh and preserve failed-shard reports (#2210)
Run the existing README consistency and Python producer guards from their CI owners. Execute full local validation fresh while preserving cached preparation, and permit scoped reuse of earlier portable build entries. Collect failed-shard diagnostics before enforcing success and publish compact, portable timing history only after a complete successful merge. Preserve installer truncation failure across supported Bash versions. Keep cancellation tests focused on the called MCP tool, observe server progress before timing target readiness, and retain delayed-startup, cancellation, cleanup, and live follow-up request assertions. Validation: all 32 CI jobs and the separate Go lane passed; 935 files, 9,630 cases, 9,544 passed, 86 skipped, zero failed. Controlled regressions and fault/restoration probes are recorded in PR #2210. Refs #2190. Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing) |
|
|
|
69e097a8ca
|
fix(scripts, install): honor test:fast "without build" promise and orient Node.js engine mismatches (#2026)
* fix(scripts): defer dist/ imports in verifier helpers so test:fast runs without build Two helpers under scripts/lib/ reached into ../../dist/ at module load even though the top-level import was only needed by one of their exports. That turned mocked, dist-free tests into failing tests under `npm run test:fast`, which docs/testing.md § test scripts explicitly promises runs "without build": - tests/conformance/providers/hopper/realHopperSemantic.test.ts only calls requireCurrentDocument and resolveFixtureProcedure (both mock-only), but scripts/lib/real-hopper-semantic.mjs eagerly imported requireFunctionDossierOracle from dist/application/RealHopperAssertions.js. Moved the dist-dependent dossier oracle into a lazy loader called from verifyRealHopperFixture, which is where it is actually used (against the real Hopper bridge, after build:cached). - tests/evaluation/package/packagePlatformDiagnostics.test.ts only uses assertLinuxPackageProviderFailure, which depends on `json`, but scripts/lib/verify-package-core.mjs eagerly re-exported helpers from mcp-verifier-results.mjs, which in turn pulls four dist/ modules. Moved that import into verifyCompleteToolCatalog (the only consumer in this file). Downstream scripts (verify-recorded-crash.mjs, verify-package-mcp.mjs, verify-windows-package.mjs) are unaffected because they already run after build:cached. Reproduction before fix: rm -rf dist && npm run test:fast → 2 failed (both import-time errors) Reproduction after fix: rm -rf dist && npm run test:fast → 388 passed, 4924 tests, 0 failed npm run build:cached && npm run test:fast → 388 passed, 4924 tests, 0 failed Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(install): orient Node.js version mismatch failures with actionable remediation install.sh previously told operators "use Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+" without saying how to install one. The curl|bash onboarding path then left the operator to guess between nvm, fnm, n, Volta, system packages, or nodejs.org — a lookup that bounces across search engines for a first-time user. Replace the one-line failure with a block that: - Names the detected Node.js version (so the operator confirms it is theirs). - Shows the three most common install paths (nvm, fnm, direct tarball). - Pins the Node.js release line (24) that satisfies the engine, so copy-paste commands produce a supported runtime instead of whichever "latest" is on top. - Maps uname -m / uname -s to the Node.js tarball label pair for this host (e.g. darwin/arm64, linux/x64), so the operator can grab the right archive from https://nodejs.org/dist/latest-v24.x/ without a second lookup. Verified with four Node.js versions (24.18 compatible, 25.9/20.11 outside the supported ranges, 22.18 below the minor floor) that remediation triggers only on real mismatches and names the host labels correctly. shellcheck install.sh and npm run check:fast remain clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> |
|
|
|
d802304c54
|
fix(install): describe automatic setup and guard truncated downloads (#1902)
* fix(install): describe automatic setup and guard truncated downloads
The help text said the installer only installs the CLI and that
`rea setup` must be run separately, but the installer starts
`rea setup` interactively whenever a terminal is available. Describe
that behaviour and the --no-setup/--no-prompt opt-out.
Wrap the installer body in `main` and call it on the last line, so a
truncated `curl | bash` download fails to parse instead of executing a
partial script. Behaviour is otherwise unchanged.
Add an installer scenario that runs a copy truncated right after the
npm install line and requires that it prints nothing and never invokes
npm; it fails against the previous script.
Validation: bash -n, shellcheck 0.10.0, installScript boundary tests.
* fix(install): require the closing token before running main
Wrapping the installer in main() kept a truncated download from running
a partial body, but the last line was a bare `main "$@"`. If the piped
download stopped right after `main` (or `main `), bash saw a complete
command at EOF and ran main with no positional parameters. Under the
documented `curl ... | bash -s -- --dry-run` (or --version / --no-setup)
path that silently dropped the caller's flags, so a dry run could resolve
the latest release, run npm, and start setup.
The call now sits in a brace group:
{
main "$@"
exit $?
}
Bash does not run the group until it has read the closing brace, so
every truncation inside it is a syntax error and nothing executes; a
truncation before the group leaves only function definitions. A comment
in install.sh records why the bare call is not enough.
Validation: a new boundary test pipes install.sh to `bash -s --
--dry-run` truncated at every byte offset from the end of main() to EOF
and asserts that npm and the rea binary are never invoked; offsets
inside the group must exit non-zero with a bash parse error and no
stdout, offsets before it must print nothing, and the complete group
must finish the dry run. Reproduced the original bug by cutting the old
script after `main`: the dry run invoked npm install. `bash -n` and
shellcheck 0.11.0 are clean.
* fix(install): wrap the whole script in the truncation guard
The previous guard only wrapped the final `main "$@"` invocation, so the
preamble streamed on the `curl ... | bash` path before any incomplete
compound command was open. A download cut off right after the bytes
`set` reached EOF with a complete, argument-less `set`, which prints every
shell variable, so inherited tokens could reach stdout.
The brace group now opens on line 2, directly after the shebang, and
closes on the last line, enclosing `set -euo pipefail`, the constants, the
functions and the final `main "$@"` / `exit $?`. Bash must therefore read
the whole file before running anything; any earlier cut is a syntax error
at EOF. `set -euo pipefail` still applies inside the group (checked
manually for `false`, an unbound variable, and a failing function body),
and shellcheck 0.11.0 and `bash -n` are clean.
The truncation test now pipes every prefix of install.sh, from byte 0 to
EOF (about 6,100 cuts, run 16 at a time with a minimal environment that
includes a sentinel variable), into `bash -s -- --dry-run`. Before the
group opens it must exit quietly; inside the group it must fail with a
syntax error; in every case stdout stays empty and neither npm nor rea is
invoked. Only the complete script performs the dry run.
|
|
|
|
60fbb2f06e |
fix(install): share arguments between the plan and npm execution
Include the Linux user prefix in the planned command. Build the install arguments once and shell-escape the printed arguments so paths with spaces or metacharacters remain reusable. Cover dry-run admission, exact argument round-trip and the unprefixed macOS command with native Bash 3.2. Refs: #1417 |
|
|
|
68b9fa489b
|
fix(install): guard empty prefix_args expansion on macOS Bash 3.2 under set -u (#1061)
* fix(install): guard empty prefix_args expansion under Bash 3.2 set -u (#1060) * test(install): cover native Bash macOS installation --------- Co-authored-by: N0zoM1z0 <1705004398@qq.com> |
|
|
|
d88d6c1897 | test(cli): reduce repeated startup and filesystem setup | |
|
|
248972f327
|
fix(installer): validate exact semantic versions (#954)
* fix(installer): validate exact semantic versions * fix(installer): reject npm-ambiguous build metadata |
|
|
|
ea0b733687 | fix(setup): align Node runtime checks with package engines | |
|
|
7ee3f236a9
|
test: replace implementation lock-in with behavioural assertions (#498)
* fix(process): normalize reactive rendered-frame timestamps A reactive `resize` action stamped `rendered_frames[].at_ms` with the raw elapsed time while every other rendered frame used `normalizeProcessElapsedTime`. Under the default 10ms time bucket the next frame buckets down and appears to move backwards, so `parseProcessCapture` rejected the entire capture with "rendered_frames: timestamps must be ordered". No test combined a reactive resize with time bucketing, so the path was never exercised. Thread the scenario's bucket into the reactive effect host and normalize the renderer call, matching what the scheduled-event resize path already did. `dispatched_at_ms` and `captured_at_ms` stay raw on both paths, so this changes only the one inconsistent clock. Also replace the wall-clock-scheduled interactive PTY scenario with terminal_text triggers. A fixed `at_ms` could fire before the child wrote its prompt under host contention, dropping the input and the resize echo. That rewrite is what surfaced this bug, and it now passes deterministically. Replace the 11 `if (!capability.available) return;` guards across the PTY suite with a shared it.skipIf gate. The old form reported a green pass with zero assertions on any host lacking native PTY authority; skips are now named and reported. Verified by reverting only the normalization, which reproduces the validation failure immediately. * fix(install): add recovery guidance to version-mismatch failure Every installer failure except one told the user what to do next. The version-mismatch failure reported only that the installed version did not match, with no remedy, which contradicts the requirement to keep diagnostics actionable for mismatch locations. Add a remedy in the same style as the neighbouring failures and drop the exemption the test carried for it, so all ten installer failures now assert they carry a recovery action. * ci: repair stale curated Windows lane and unblind the duplication gate The `windows-curated` job listed fifteen test files and nine of them no longer existed, including six `processOwnership*` files moved to `src/process/` in |
|
|
|
e91c8c39c2
|
refactor(test): colocate pure-domain tests and reduce test debt (#471)
* refactor(test): colocate pure-domain tests and reduce test debt Move focused immutable domain/contracts/adapter tests from tests/composition/** beside their production owners under src/** as colocated *.test.ts/*.fixture.ts, and relocate persistence-shaped composition tests under tests/boundary/filesystem/**. Update import paths, the Vitest project topology (shared worker context for pure domain/contracts and recording-port service projects), the test migration ledger, testing docs, and AGENTS.md to match. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs: remove test migration ledger The cutover is complete and the ledger is no longer referenced anywhere in source, scripts, or the docs gate. Drop the standalone artifact. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * docs: clean up stale migration artifacts Remove empty directories left by the test migration and replace the "final cutover" language in docs/testing.md with standing PR guidance that no longer references the completed migration. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: repair CI failures from schema, knip, and stale generated artifacts Three root causes fixed: 1. catalog-schemas.mjs: valuesAt only traversed anyOf from Zod's toJSONSchema, not oneOf. The webScreenshotDiffSchema change to a discriminated union produces oneOf, so the product catalog generator could not derive the web_screenshot_diff schema version. Add oneOf traversal. 2. conformancePackage.ts: the test rewrite removed the only imports of ScenarioManifest, ReplayPlan, ShimPlan, and ExpectedEvidence, making them unused exports that knip flags. Remove the dead type aliases. 3. Regenerate stale artifacts (product catalog, MCP tool catalog, skill metadata, conformance manifest) that drifted from the source changes. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
|
|
|
513d9b1555 | test: overhaul deterministic suite architecture |
Renamed from tests/installScript.test.ts (Browse further)