Environment-awareness tooling: allod env + capability descriptor contract #99
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
User story: So that I can tell at session start what an environment is allowed to read or push, public tooling needs a shared capability descriptor and commands that surface those permissions clearly.
Part of the "Environment identity & capability descriptor" arc.
Problem
A session's capabilities — which repos it can read, whether it can push to
public — are implicit in Forgejo ACLs and only surface when an operation hits a
wall. Neither the human nor the agent can tell, at session start, which
environment they are in (
allod-devis blind to private repos;nix-devcannotpush public). This is the public, framework-agnostic half of a cross-repo effort
to make environment identity ambient; the private half (rendering the descriptor
from inventory and wiring the UX surfaces) is tracked separately in the private
stack.
Scope (allod/tools)
Public tooling that reads a descriptor the private side produces:
/etc/allod/env.json(plus ahuman-readable
/etc/allod/env.txt), schema{ hostname, forge_identity, can_read_private, can_push_public, reachable_repos, summary },so the private provisioner has a fixed target.
allod env(aliasallod whoami): print the environmenthuman-readably, color-coded by capability;
--jsonfor machine use; degradegracefully by deriving from hostname + forge identity (and saying so) when the
descriptor is absent.
git-hooks/(same pattern asprotected-refs-policy): block a push the current environment is not allowedto make, failing early with a message that names the environment and the relay
path instead of an opaque Forgejo auth error.
agent SessionStart hook / status line to consume (the wiring itself is
private-side).
All four read the same descriptor — one brain, many faces.
Out of scope
Producing the descriptor (private
nexus/inventory); status line, shellprompt, and MOTD wiring (private
profiles).Done when
allod envreports correctly on a descriptor-provisioned VM and degrades withoutone; the guard blocks a disallowed push in a fixture with a clear,
environment-named error; tests cover both paths. Environment-awareness also folds
naturally into the
forge/allodGo rewrite (#98).