feat(hero_proc_server): make FORGE_TOKEN optional at bootstrap (D-06) #97
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_proc!97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik_proc_token_optional"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Drops the hero_proc_server hard-fail exit on missing
FORGE_TOKENenv. The supervisor itself does not need a Forgejo credential to manage local processes; operations that genuinely need it (secret pull/secret push,forge merge-driven service installs) fail individually with their own error messages.This is the structural fix locked by D-06: forge-token-bootstrap-optional in the ai-pipeline workspace.
Why
Commits
chore: cargo fmt --all + clippy --fix workspace cleanup— pre-existing fmt + clippy debt across 106 files surfaced by the pre-merge gate (cargo fmt --all -- --check && cargo clippy --workspace --all-targets --keep-going -- -D warnings). Mechanical only, no behavior change. Bundled here so the next commit lands on a green workspace.feat(hero_proc_server): make FORGE_TOKEN optional at bootstrap— drop the early hard-fail incrates/hero_proc_server/src/main.rs; log truthfulforge_tokenstatus (set / unset with consequence reminder) after tracing init; bumpbuildenv.shVERSION 0.4.4 → 0.5.0 to align with the already-bumped workspace Cargo.toml.Validation
End-to-end on heroci with the patched binary in place and no
FORGE_TOKEN/FORGEJO_TOKENin env: hero_proc_server boots healthy and the startup log line correctly statesforge_token="unset (forge ops will fail until set via env orsecret pull)".Old v0.4.4 binary in the same env exits with
error: FORGE_TOKEN environment variable is required but not set.— confirming the hard-fail removal is the load-bearing change.With
FORGE_TOKENset, behavior is unchanged (log saysforge_token="set").Test plan
service_proc install --download --version v0.5.0-rc1+service_proc start --download(no FORGE_TOKEN) → greenRefs
decisions/D-06-forge-token-bootstrap-optional.md)Companion PR on hero_skills (forthcoming): nu wrapper soft-warn on missing FORGE_TOKEN +
svc_verify_binaries_freshdownload-aware + 14 services with uniformservice_X start --download.The supervisor must start regardless of whether FORGE_TOKEN is present in the OS environment. Operations that genuinely need a Forgejo credential (`secret pull`, `secret push`, `forge merge`-driven service installs) fail individually at their call sites with their own error messages. This unblocks the canonical home#121 onboarding flow on a fresh VM ("mosh in → service_complete") which previously required exporting FORGE_TOKEN before the very first boot — there was no place to read it from beforehand because hero_proc_server *is* the secrets store that holds it. Changes: - crates/hero_proc_server/src/main.rs: drop the early hard-fail exit(1) on missing FORGE_TOKEN. Replace the always-"set" log line with a truthful status string (set / unset (with consequence reminder)) emitted after tracing init. - buildenv.sh: VERSION 0.4.4 → 0.5.0 (workspace was already at 0.5.0; this aligns the release tag). Validated end-to-end on heroci with the patched binary in place and no FORGE_TOKEN/FORGEJO_TOKEN in env: hero_proc_server boots healthy and the startup log line correctly states `forge_token="unset (forge ops will fail until set via env or \`secret pull\`)"`. With FORGE_TOKEN set, behavior is unchanged. See decision: D-06 forge-token-bootstrap-optional in the ai-pipeline workspace. Refs: lhumina_code/home#225 Signed-off-by: mik-tf