Delete the superseded plaintext seed pair, move the test double to its test
`inMemoryKeyStore`, `readSeedPhrase`, and `writeSeedPhrase` in
`packages/openagents-cli/src/seed-identity.ts` were flagged by
`uncalled-production-symbol-guard`: their only caller was their own test.
Scope item 1 of #126. The three are not the same case.
`readSeedPhrase` and `writeSeedPhrase` were one-line wrappers over the live
encrypted-envelope API that #98 introduced. `writeSeedPhrase(p, ks)` was
exactly `storeSeedPhrase(p, ks).path`, and `readSeedPhrase(ks)` was
`loadSeed(ks)`'s phrase. Both are deleted.
The legacy-plaintext question #126 asked to settle first is settled and
nothing is lost with them: `loadSeed` reads a pre-#98 plaintext seed itself
(`if (!looksSealed(text)) return { phrase: normalize(text), protection:
"plaintext_file" }`), and `protectSeed` migrates it under the keychain. The
deleted pair added no migration path of its own.
`inMemoryKeyStore` is a test double that was living in `src`. Deleting it
would have deleted real coverage of live code, so it moves verbatim into
`test/seed-identity.test.ts` instead. Six sites use it to exercise
`storeSeedPhrase`, `loadSeed`, and `protectSeed`, including the
sealed-without-key and wrong-key error paths.
The 20 call sites of the deleted pair are rewritten onto the live API rather
than removed, so their coverage survives: 14 `readSeedPhrase` to
`loadSeed(...)?.phrase`, 6 `writeSeedPhrase` to `storeSeedPhrase(...).path`.
No test is deleted; the file holds 20 tests before and after, all passing.
The two assertions that read `undefined` still do: `loadSeed` returns
`undefined` for both an absent and an empty seed file. The `toThrow`
assertions still name `loadSeed` and `storeSeedPhrase`, which is where those
throws always came from.
Also fixes the two now-dangling `{@link readSeedPhrase}` references in the
module header and in `loadSeed`'s own doc comment.
Nothing is added to `uncalled-production-symbol-baseline.json`: the owner
asked for deletion, not suppression.
Delete the superseded plaintext seed pair, move the test double to its test
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
packages/openagents-cli/src/seed-identity.ts -
modified
packages/openagents-cli/test/seed-identity.test.ts
Diff
2 files changed, +44 -62
packages/openagents-cli/src/seed-identity.ts modified +3 -39
@@ -23,7 +23,7 @@
| 23 | 23 |
|
| 24 | 24 |
|
| 25 | 25 |
|
| 26 |
|
|
| 26 |
|
|
| 27 | 27 |
|
| 28 | 28 |
|
| 29 | 29 |
|
@@ -507,25 +507,6 @@ export const noKeyStore: SeedKeyStore = {
| 507 | 507 |
|
| 508 | 508 |
|
| 509 | 509 |
|
| 510 |
|
|
| 511 |
|
|
| 512 |
|
|
| 513 |
|
|
| 514 |
|
|
| 515 |
|
|
| 516 |
|
|
| 517 |
|
|
| 518 |
|
|
| 519 |
|
|
| 520 |
|
|
| 521 |
|
|
| 522 |
|
|
| 523 |
|
|
| 524 |
|
|
| 525 |
|
|
| 526 |
|
|
| 527 |
|
|
| 528 |
|
|
| 529 | 510 |
|
| 530 | 511 |
|
| 531 | 512 |
|
@@ -574,8 +555,8 @@ export const seedProtectionOnDisk = (): SeedProtection | undefined => {
| 574 | 555 |
|
| 575 | 556 |
|
| 576 | 557 |
|
| 577 |
|
|
| 578 |
|
|
| 558 |
|
|
| 559 |
|
|
| 579 | 560 |
|
| 580 | 561 |
|
| 581 | 562 |
|
@@ -599,17 +580,6 @@ export const loadSeed = (
| 599 | 580 |
|
| 600 | 581 |
|
| 601 | 582 |
|
| 602 |
|
|
| 603 |
|
|
| 604 |
|
|
| 605 |
|
|
| 606 |
|
|
| 607 |
|
|
| 608 |
|
|
| 609 |
|
|
| 610 |
|
|
| 611 |
|
|
| 612 |
|
|
| 613 | 583 |
|
| 614 | 584 |
|
| 615 | 585 |
|
@@ -662,12 +632,6 @@ export const storeSeedPhrase = (
| 662 | 632 |
|
| 663 | 633 |
|
| 664 | 634 |
|
| 665 |
|
|
| 666 |
|
|
| 667 |
|
|
| 668 |
|
|
| 669 |
|
|
| 670 |
|
|
| 671 | 635 |
|
| 672 | 636 |
|
| 673 | 637 |
|
packages/openagents-cli/test/seed-identity.test.ts modified +41 -23
@@ -42,18 +42,15 @@ import {
| 42 | 42 |
|
| 43 | 43 |
|
| 44 | 44 |
|
| 45 |
|
|
| 46 | 45 |
|
| 47 | 46 |
|
| 48 | 47 |
|
| 49 | 48 |
|
| 50 |
|
|
| 51 | 49 |
|
| 52 | 50 |
|
| 53 | 51 |
|
| 54 | 52 |
|
| 55 | 53 |
|
| 56 |
|
|
| 57 | 54 |
|
| 58 | 55 |
|
| 59 | 56 |
|
@@ -76,6 +73,27 @@ const FROZEN = {
| 76 | 73 |
|
| 77 | 74 |
|
| 78 | 75 |
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 79 | 97 |
|
| 80 | 98 |
|
| 81 | 99 |
|
@@ -139,35 +157,35 @@ describe("seed storage", () => {
| 139 | 157 |
|
| 140 | 158 |
|
| 141 | 159 |
|
| 142 |
|
|
| 160 |
|
|
| 143 | 161 |
|
| 144 | 162 |
|
| 145 | 163 |
|
| 146 |
|
|
| 147 |
|
|
| 164 |
|
|
| 165 |
|
|
| 148 | 166 |
|
| 149 | 167 |
|
| 150 | 168 |
|
| 151 | 169 |
|
| 152 |
|
|
| 170 |
|
|
| 153 | 171 |
|
| 154 |
|
|
| 172 |
|
|
| 155 | 173 |
|
| 156 | 174 |
|
| 157 | 175 |
|
| 158 | 176 |
|
| 159 | 177 |
|
| 160 |
|
|
| 178 |
|
|
| 161 | 179 |
|
| 162 | 180 |
|
| 163 | 181 |
|
| 164 | 182 |
|
| 165 | 183 |
|
| 166 |
|
|
| 184 |
|
|
| 167 | 185 |
|
| 168 | 186 |
|
| 169 |
|
|
| 170 |
|
|
| 187 |
|
|
| 188 |
|
|
| 171 | 189 |
|
| 172 | 190 |
|
| 173 | 191 |
|
@@ -179,7 +197,7 @@ describe("seed storage", () => {
| 179 | 197 |
|
| 180 | 198 |
|
| 181 | 199 |
|
| 182 |
|
|
| 200 |
|
|
| 183 | 201 |
|
| 184 | 202 |
|
| 185 | 203 |
|
@@ -213,7 +231,7 @@ describe("seed protection at rest", () => {
| 213 | 231 |
|
| 214 | 232 |
|
| 215 | 233 |
|
| 216 |
|
|
| 234 |
|
|
| 217 | 235 |
|
| 218 | 236 |
|
| 219 | 237 |
|
@@ -225,7 +243,7 @@ describe("seed protection at rest", () => {
| 225 | 243 |
|
| 226 | 244 |
|
| 227 | 245 |
|
| 228 |
|
|
| 246 |
|
|
| 229 | 247 |
|
| 230 | 248 |
|
| 231 | 249 |
|
@@ -239,9 +257,9 @@ describe("seed protection at rest", () => {
| 239 | 257 |
|
| 240 | 258 |
|
| 241 | 259 |
|
| 242 |
|
|
| 260 |
|
|
| 243 | 261 |
|
| 244 |
|
|
| 262 |
|
|
| 245 | 263 |
|
| 246 | 264 |
|
| 247 | 265 |
|
@@ -253,7 +271,7 @@ describe("seed protection at rest", () => {
| 253 | 271 |
|
| 254 | 272 |
|
| 255 | 273 |
|
| 256 |
|
|
| 274 |
|
|
| 257 | 275 |
|
| 258 | 276 |
|
| 259 | 277 |
|
@@ -268,7 +286,7 @@ describe("seed protection at rest", () => {
| 268 | 286 |
|
| 269 | 287 |
|
| 270 | 288 |
|
| 271 |
|
|
| 289 |
|
|
| 272 | 290 |
|
| 273 | 291 |
|
| 274 | 292 |
|
@@ -303,7 +321,7 @@ describe("seed protection at rest", () => {
| 303 | 321 |
|
| 304 | 322 |
|
| 305 | 323 |
|
| 306 |
|
|
| 324 |
|
|
| 307 | 325 |
|
| 308 | 326 |
|
| 309 | 327 |
|
@@ -328,7 +346,7 @@ describe("seed protection at rest", () => {
| 328 | 346 |
|
| 329 | 347 |
|
| 330 | 348 |
|
| 331 |
|
|
| 349 |
|
|
| 332 | 350 |
|
| 333 | 351 |
|
| 334 | 352 |
|
@@ -347,8 +365,8 @@ describe("seed protection at rest", () => {
| 347 | 365 |
|
| 348 | 366 |
|
| 349 | 367 |
|
| 350 |
|
|
| 351 |
|
|
| 368 |
|
|
| 369 |
|
|
| 352 | 370 |
|
| 353 | 371 |
|
| 354 | 372 |
|