fix: recover credentials a stacklet lost, without a reinstall - #65
Merged
Conversation
An instance installed before the vault write token existed held none, so every write answered "Forgejo credentials missing" and no restart helped: the repair only ran once there was a remote to test, and a missing token builds no remote. Now a missing token is minted on the next `stack up memory`, the same cure a rejected one already got.
Secrets are minted once, during install, so a stacklet that starts needing one later leaves every existing instance without it, silently. Doctor knew only about containers and called such a stack healthy. A stacklet now declares `required_secrets` in its manifest and doctor names any that are absent, pointing at `stack setup <id>`.
The token was obtained during install and never again, so an instance that lost one (a destroy cycle gives Paperless a new database) or was installed before it was stored had no way back. Seeding skipped every start without saying why and the archivist could not file anything. Both hooks now share one path that re-checks the token on every `stack up docs` and asks Paperless for a new one when it is refused.
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.
Secrets minted by install-only hooks never came back once lost, so an
instance kept failing quietly and the only cure was re-running setup by
hand. Memory and docs now repair themselves on the next
stack up, anddoctor reports what it cannot repair.
Forgejo rejects the one on file
when it is refused
required_secrets; doctor names any that areabsent and points at
stack setup <id>🤖 Generated with Claude Code