Fix v1.0.179: backlog cleanup — base URL entry, unicode ledger, linger race, latent crashes, test flakiness - #250
Merged
Merged
Conversation
…nger race, latent crashes, test flakiness Clears the remaining pre-existing open issues carried since before v1.0.177. User-facing bugs - #205 provider base URL was unreachable in TUI onboarding: input routed to the API-key field whenever a provider needed BOTH a key and a base URL (custom / OpenAI-compatible), and Tab was bound to key-masking so focus could not move. Tab/Up/Down now move between the key and URL fields, Ctrl+R toggles key visibility, and submission validates a required base URL with actionable guidance. (priv/rust/tui/src/dialogs/onboarding.rs, view/onboarding_flow.rs) - #212 FileState read-ledger missed NFD unicode filenames on Linux: the ledger key and the filesystem path were both NFC-normalized, so a rescued read recorded against the on-disk NFD name was stat'd under a non-existent NFC path and silently not recorded, then the edit was rejected as "never read". Split into fs_path/1 (no normalization, for FS ops) and key_path/1 (NFC, ledger key only). Proven fail-without-fix on real Linux (Docker). Correctness / latent crashes - #248 attack_orchestrator.ex execute_sequence/1 had four reachable crashes (undefined AttackTree.next_classes/2 and ClassQueue.enqueue/2, a wrong weapon shape raising KeyError, and a BadMapError updating a list with map syntax). Wired to the real ClassQueue.put/3, removed dead paths, no capability changed. - #179 subagent linger "resident reuse" race: the linger Registry key was registered inside an unsynchronized spawn, so under load a fast resume missed it, fell to run_fresh_subagent, and terminated the very resident it should reuse. start_linger now waits (bounded) for the key to be observable before reporting :lingering. Load-dependent, so verified by construction + no local regression. Test integrity (#208) - computer_use_test used function_exported?/3 without Code.ensure_loaded? — a phantom "missing get_tree/0" in full-suite runs (get_tree/0 exists). Guarded. - anti_flagging_test restored a deleted global :openai_api_key inline, leaking it on any assertion failure; moved to on_exit. Audited put_env/ets/persistent_term across test/. - Sandbox.CostTracker singleton was start_link'd per-test (linked to the ephemeral test process), so it died mid-run and a concurrent call hit "no process". Started once persistently in test_helper. 4/5 -> 8/8 stable. - StaticBaseSizeTest measured the developer's personal ~/.osa/rules (machine- specific, ~1.6k tokens), making the base swing 10.5k-12k. Now pins OSA_HOME to an empty dir so the base is product-only and deterministic (10,563 tokens). The :native_tools bound moved 10_000 -> 11_500 on audited legitimate growth (the SYSTEM_LEAN "Operating discipline" safety pre-brief + a larger tool roster; only ~40 tokens were duplicate). It remains a regression fence. Full suite: 10,972 tests, 0 real failures (ToolchainPinTest fails only on a dev machine whose Elixir differs from the pinned version; it passes in CI).
The screenshot test's case already documents {:error, _} as acceptable on a
headless runner, but ComputerUse.execute raises a RuntimeError by design when no
DISPLAY/WAYLAND_DISPLAY is present, so the raise escaped the case and failed the
test. It was green on the v1.0.178 CI runner and red on the next one with the
same product code — a display-dependent #208 flake. Tolerate the intended
no-display raise as the same acceptable outcome; the happy path still asserts a
real image when a display is present.
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.
Clears the remaining pre-existing open issues carried since before v1.0.177.
Fixed
fs_path/1(no normalization) fromkey_path/1(NFC key). Proven fail-without-fix on real Linux via Docker.attack_orchestrator.exhad 4 reachable crashes (2 undefined calls + wrong weapon shape + BadMapError). Wired to the realClassQueue.put/3; dead paths removed; no capability changed.spawn, so a fast resume could terminate the resident it should reuse.start_lingernow waits (bounded) for the key to be observable before reporting:lingering.computer_use_test(function_exported?withoutensure_loaded?→ phantom "missing get_tree/0"),anti_flagging_test(inline restore of a global on failure),Sandbox.CostTracker(per-teststart_linklinked to the ephemeral test proc → "no process"; now persistent in test_helper, 4/5 → 8/8), plus an audit ofput_env/ets/persistent_term.Verification
Full suite: 10,972 tests, 0 real failures. (
ToolchainPinTestfails only on a dev box whose Elixir ≠ the pinned version; passes in CI.) Each fix has a regression test; #212 and #248 verified fail-without-fix, #179 verified by construction + no local regression.The
:native_toolsstatic-prompt bound was raised 10,000 → 11,500. Two parts:~/.osa/rules(~1.6k tokens, machine-specific). Now pinsOSA_HOMEto an empty dir → product-only, deterministic base of 10,563 tokens.SYSTEM_LEAN.md"Operating discipline" safety pre-brief (prompt-injection defense, verify-recalled-path, shell hygiene — none duplicated elsewhere) + a larger tool roster; only ~40 tokens are actual duplicate. Trimming to the old number would delete real safety guidance. The fence still catches future prose creep.If you'd rather keep the fence at ~8–10k and trim the prompt instead, say so and it's a separate change.