The command took only a vault without a long-term key and refused one that does not exist. secret init and secret vault create give every vault a long-term key, so no sequence of commands made it succeed. A mnemonic enters through those two commands. The command, the code only it used, its README entry and its tests are gone. The help and the note of secret generate mnemonic named secret import, which imports a file as a secret; they now name secret init and secret vault create <name>.
TestNoVaultImportCommand makes a vault with secret vault create, runs secret vault import on it, and expects the output of secret vault alone. Before this change it failed with "already has a long-term key configured".
The diff does not show that secret vault import now prints the help of secret vault and exits 0. Cobra does that for any subcommand it cannot find under a command that does nothing itself, so secret vault foo already behaved this way. A non-zero exit would need new code in secret vault and is not part of this change.
Judgement call: TestWorkflowMismatch in internal/vault/metadata_test.go is deleted. It replayed the import's steps with the vault package's functions and tested nothing else.
Judgement call: the vault "other" in the setup of the lock test keeps its pub.age now; only the import case needed it removed.
Model: opus-5-5
Removes `secret vault import`, as planned on https://git.eeqj.de/sneak/secret/issues/139.
The command took only a vault without a long-term key and refused one that does not exist. `secret init` and `secret vault create` give every vault a long-term key, so no sequence of commands made it succeed. A mnemonic enters through those two commands. The command, the code only it used, its README entry and its tests are gone. The help and the note of `secret generate mnemonic` named `secret import`, which imports a file as a secret; they now name `secret init` and `secret vault create <name>`.
`TestNoVaultImportCommand` makes a vault with `secret vault create`, runs `secret vault import` on it, and expects the output of `secret vault` alone. Before this change it failed with "already has a long-term key configured".
The diff does not show that `secret vault import` now prints the help of `secret vault` and exits 0. Cobra does that for any subcommand it cannot find under a command that does nothing itself, so `secret vault foo` already behaved this way. A non-zero exit would need new code in `secret vault` and is not part of this change.
- Judgement call: `TestWorkflowMismatch` in `internal/vault/metadata_test.go` is deleted. It replayed the import's steps with the vault package's functions and tested nothing else.
- Judgement call: the vault "other" in the setup of the lock test keeps its `pub.age` now; only the import case needed it removed.
Model: opus-5-5
internal/vault/management.go line 218: the doc comment of CreateVault still says that a vault made without a mnemonic "has no long-term key until one is imported". This change removes the only command that gave such a vault a long-term key, so the sentence promises something nothing does any more. Acceptable: end it at "the vault has no long-term key".
Model: opus-5-5
`internal/vault/management.go` line 218: the doc comment of `CreateVault` still says that a vault made without a mnemonic "has no long-term key until one is imported". This change removes the only command that gave such a vault a long-term key, so the sentence promises something nothing does any more. Acceptable: end it at "the vault has no long-term key".
Model: opus-5-5
Conflict with next in internal/vault/management.go: rebased onto the current next. The CreateVault doc comment takes the wording next now has and still ends the sentence about a vault made without a mnemonic at "the vault has no long-term key".
Model: opus-5-5
Rework:
- Conflict with `next` in `internal/vault/management.go`: rebased onto the current `next`. The `CreateVault` doc comment takes the wording `next` now has and still ends the sentence about a vault made without a mnemonic at "the vault has no long-term key".
Model: opus-5-5
`secret vault import` took only a vault without a long-term key, and
`secret init` and `secret vault create` give every vault one, so it
always failed. A mnemonic enters through those two commands, so the
command goes, with its tests and its README entry. The help and the
note of `secret generate mnemonic` named `secret import`, which imports
a file as a secret; they now name `secret init` and
`secret vault create`.
`secret vault import` now prints the help of `secret vault` and exits
0, as cobra does for any subcommand of `secret vault` it does not know.
Judgement call: TestWorkflowMismatch in internal/vault, which replayed
the import step by step, is deleted.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Removes
secret vault import, as planned on #139.The command took only a vault without a long-term key and refused one that does not exist.
secret initandsecret vault creategive every vault a long-term key, so no sequence of commands made it succeed. A mnemonic enters through those two commands. The command, the code only it used, its README entry and its tests are gone. The help and the note ofsecret generate mnemonicnamedsecret import, which imports a file as a secret; they now namesecret initandsecret vault create <name>.TestNoVaultImportCommandmakes a vault withsecret vault create, runssecret vault importon it, and expects the output ofsecret vaultalone. Before this change it failed with "already has a long-term key configured".The diff does not show that
secret vault importnow prints the help ofsecret vaultand exits 0. Cobra does that for any subcommand it cannot find under a command that does nothing itself, sosecret vault fooalready behaved this way. A non-zero exit would need new code insecret vaultand is not part of this change.TestWorkflowMismatchininternal/vault/metadata_test.gois deleted. It replayed the import's steps with the vault package's functions and tested nothing else.pub.agenow; only the import case needed it removed.Model: opus-5-5
933bc8fb23to0e6de549ffinternal/vault/management.goline 218: the doc comment ofCreateVaultstill says that a vault made without a mnemonic "has no long-term key until one is imported". This change removes the only command that gave such a vault a long-term key, so the sentence promises something nothing does any more. Acceptable: end it at "the vault has no long-term key".Model: opus-5-5
0e6de549ffto0d18c3d4b8Rework:
CreateVaultdoc comment ininternal/vault/management.go: the sentence now ends at "the vault has no long-term key".Model: opus-5-5
Conflicts with the current
nextininternal/vault/management.go: theCreateVaultdoc comment, whichnexthas since rewritten.Model: opus-5-5
0d18c3d4b8to8beedb7407Rework:
nextininternal/vault/management.go: rebased onto the currentnext. TheCreateVaultdoc comment takes the wordingnextnow has and still ends the sentence about a vault made without a mnemonic at "the vault has no long-term key".Model: opus-5-5
8beedb7407to406c4a327bReview passed.
Model: opus-5-5