Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Commits on main

test(approval): stop the gate tests racing their own TTL
Nguyen Thanh Dat committed 3 months ago
b0b5350
e38b86a
314c0e8
test(observability): assert the wallet reporting decision at Sentry, not in logs\n\nCodex on #5967: this file's module doc says the observable contract is "this\ndoes not page", but the assertions were on tracing output, and paging is not\ndecided there. `report_error_message` reaches Sentry by calling\n`sentry::with_scope` / `capture_message` directly (core/observability.rs), not\nthrough a tracing layer, and no Sentry tracing layer is installed here. So the\nINFO/ERROR assertions would keep passing if the expected case started paging,\nor if the genuine-error capture stopped.\n\nThe gate matters for where the fix belongs: that capture is\n`#[cfg(feature = "crash-reporting")]`, which is absent from `[features]\ndefault` but present in scripts/ci/product-features.txt — and the e2e lane\nruns this target with that set (scripts/test-rust-e2e.sh passes\nproduct-features.sh). The gap is real in the lane that runs it.\n\nAdd a `#[cfg(feature = "crash-reporting")] mod paging` counting envelopes on a\n`sentry::test::TestTransport`, wired as tests/observability_smoke.rs does,\nincluding its process-global `sentry::init` lock — cargo runs these functions\non parallel threads.\n\n a_wrapped_wallet_state_pages_nobody -> 0 captured\n a_genuine_wallet_failure_still_pages -> 1 captured\n\nAdded, not substituted: the INFO/ERROR assertions pin the breadcrumb's level\nand its `kind` field, which is what makes a demotion attributable and which\nTestTransport does not see. `#[cfg]` on the module rather than\n`required-features` on the target: with the gate off there is nothing to\ncapture and both counts would be a vacuous 0, while `required-features` would\ntake the classification tests down with it in every contributor build — the\nblunt instrument Cargo.toml already warns about on `observability_smoke`.\n\nProved non-vacuous: swapping the two inputs fails both new tests.\n\ncargo test --features crash-reporting --test observability_wallet_expected_e2e\n -> 8 passed; 0 failed\n
M3gA-Mind committed 3 months ago
fda6f5b
f09ff10
90d4650
style(app): run prettier on the new lint-rule test
Nguyen Thanh Dat committed 3 months ago
293dbbc
eac8478
lint(app): enforce the centralized-frontend-config rule, and fix its one violation\n\nAGENTS.md states the rule plainly: "Frontend config centralized in\napp/src/utils/config.ts -- never read import.meta.env directly elsewhere."\nNothing enforced it, and it had already drifted:\nTwoPanelLayout's debug() read import.meta.env.DEV directly.\n\nThe rule is not cosmetic. config.ts owns derived values a raw read cannot\ngive you -- IS_DEV_LIKE exists precisely because import.meta.env.DEV is\nfalse under the E2E harness (vite build --mode development sets PROD=true),\nwhich the comment beside it spells out. A raw read is also unstubbable once\nthe module graph has loaded; loopbackOauthListener.test.ts already documents\nthat, and reads through config for exactly this reason.\n\nAdds a no-restricted-syntax rule over src/**, exempting config.ts itself and\ntest files, with a message naming the replacement. Scoped narrowly: vite.config.ts\nmust define these values and is outside src/.\n\nThe one violation is fixed by importing IS_DEV. That is deliberately\nbehaviour-preserving -- IS_DEV is exactly import.meta.env.DEV. If the intent\nwas for this debug output to appear under the E2E harness too, IS_DEV_LIKE is\nthe one-word change, but that is a behaviour decision rather than a lint fix,\nso I left it alone.\n\nVerified: with the rule added and the source untouched, eslint reports exactly\none error, at TwoPanelLayout.tsx:17. After the fix the run returns to the\nbaseline 98 warnings / 0 errors -- no new warning anywhere. prettier --check\nclean on both files, tsc --noEmit clean, and TwoPanelLayout.test.tsx 7/7.\n
Nguyen Thanh Dat committed 3 months ago
d5fe545
fix(mcp): fail closed when the active workspace is unknown\n\nBoth CodeRabbit findings on a3088a1a8.\n\n**Major — fail closed.** `should_announce` announced anyway when\n`active_workspace_dir` failed, and my justification for that was wrong. I\nargued a swallowed "your MCP tools are down" was the worse outcome, but the\nnotification is already persisted under its own workspace before the broadcast\nruns — that is exactly the split #3805 built, with the store as the durable\nchannel and the broadcast as best effort. So suppressing costs a *banner*, not\nthe alert, while announcing on an unknown workspace can put another account's\nqualified server name and transport error in front of whoever is connected,\nwhich cannot be undone. It now fails closed.\n\nThe rule moved into `announces_to`, a free function over its two inputs, so the\nfail-closed arm is asserted directly rather than only described — reaching it\nthrough `should_announce` would mean making the on-disk config unreadable.\n\n**Minor — drop order in the env-guarded tests.** The explicit `drop(lock)` at\nthe end of each test released `TEST_ENV_LOCK` while `ActiveWorkspaceEnvGuard`\nwas still holding `OPENHUMAN_WORKSPACE` set, so the next test could take the\nlock, set its own override, and have this test's guard erase it. Dropping the\nexplicit release lets scope exit destroy the guard first — it is declared after\nthe lock — so the variable is cleared while the lock is still held.\n\n
Shanu committed 3 months ago
22df4ab
06c69ad