Replace --secret Flag with --repo and Retire Legacy Secret Staging in Sandbox Runner¶
Status: Accepted (Amends ADR 0002, ADR 0003, ADR 0023, ADR 0028, and ADR 0038)
Context¶
Historically, sandbox/main.py used -s / --secret because each target repository maintained an individual directory on the host under secrets/<repo>/fetch.env (ADR 0003). With the acceptance of ADR 0038 (Centralized Organization Credentials and In-Repo Secrets Architecture), all repository authentication consolidated into a single SOPS-encrypted secrets/github-orgs.env, and project runtime secrets moved into .secrets/env.map inside target repositories. Consequently, the --secret argument in sandbox/main.py actually designated the GitHub repository being cloned, not a distinct secret file.
Furthermore, testing previously targeted a separate GitHub organization (software-factory-09-test, ADR 0023). Maintaining separate organizations created credential fragmentation and unnecessary access overhead.
Decision¶
- Canonical
-r/--repoCLI Flag: - Replace
-s/--secretwith-r/--repoinsandbox/cli.pyandsandbox/main.py. - Cleanly remove
-sand--secret. - Update all CLI parser error and validation messages to reference
-r/--repo. - Unified Testing Under
sFactory0withtest-Prefix: - Retire
software-factory-09-testandDEFAULT_TEST_ORG. - Standardize default organization to
DEFAULT_ORG = "sFactory0". - When
--testingis provided, automatically ensure the repository name carries thetest-prefix undersFactory0(e.g.sFactory0/test-<repo>). If the user already providestest-<repo>, prevent duplicate prefixing. - Purge Legacy Host Secrets Staging and Startup Fallbacks:
- Completely remove legacy
secrets/<repo>/fetch.envandsecrets_org/folder resolution fromsandbox/main.py. - Stage
secrets/github-orgs.envexclusively. - Purge legacy
/root/secrets/org/tokenand/root/secrets/repo/fetch.envfallback branches fromshared/startup.sh.
Consequences¶
- CLI semantics directly describe the action being performed (cloning
--repo). - Host repository secret sprawl and legacy fallbacks are eliminated.
- Test workflows use unified organization credentials with predictable, isolated
test-repository namespaces undersFactory0.