Stop the flag tests writing into the developer's real home `oa` resolves its config directory from `HOME`, and the test helper spawned the binary with the one it inherited. So every run of this suite wrote into the real `~/.config/openagents`. It was not theoretical. A single live audit left 79 stub authorizations in the real `device-authorizations.json` — keyed by ephemeral `http://127.0.0.1:<port>` origins, 23 kB of them — mixed in with a genuine pending authorization. And because several agents ran this suite at once against that one shared file, `repeated_scopes_are_all_sent` flaked with a write error that had nothing to do with what it tests. The helper now hands the child a `HOME` of this test binary's own. That is one place rather than one per test, so a test added later cannot forget. Checked by running the suite and comparing the real file's size before and after: unchanged. The 79 stub entries have been removed from it by hand; the real one was left alone.
Stop the flag tests writing into the developer's real home
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
Not deployed through the forge lane
No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.
Changed files
-
modified
crates/openagents-cli/tests/flags.rs
Diff
1 file changed, +29 -0
crates/openagents-cli/tests/flags.rs modified +29
@@ -9,9 +9,12 @@
| 9 | 9 |
|
| 10 | 10 |
|
| 11 | 11 |
|
| 12 |
|
|
| 12 | 13 |
|
| 13 | 14 |
|
| 15 |
|
|
| 14 | 16 |
|
| 17 |
|
|
| 15 | 18 |
|
| 16 | 19 |
|
| 17 | 20 |
|
@@ -107,12 +110,38 @@ struct Output {
| 107 | 110 |
|
| 108 | 111 |
|
| 109 | 112 |
|
| 113 |
|
|
| 114 |
|
|
| 115 |
|
|
| 116 |
|
|
| 117 |
|
|
| 118 |
|
|
| 119 |
|
|
| 120 |
|
|
| 121 |
|
|
| 122 |
|
|
| 123 |
|
|
| 124 |
|
|
| 125 |
|
|
| 126 |
|
|
| 127 |
|
|
| 128 |
|
|
| 129 |
|
|
| 130 |
|
|
| 131 |
|
|
| 132 |
|
|
| 133 |
|
|
| 134 |
|
|
| 135 |
|
|
| 136 |
|
|
| 137 |
|
|
| 110 | 138 |
|
| 111 | 139 |
|
| 112 | 140 |
|
| 113 | 141 |
|
| 114 | 142 |
|
| 115 | 143 |
|
| 144 |
|
|
| 116 | 145 |
|
| 117 | 146 |
|
| 118 | 147 |
|