docs: Add org portability design spec - #42
Conversation
Single source of org truth: one committed profile file (config/org.env) + a program-lib loader that resolves ORG, FORK_OWNER, MAIN_REPO, REPOS_DIR by precedence (flag > env > profile > default). All scripts derive repo refs, fork targets, and clone paths from it; no script carries an org literal. First consumer completes the rossoctl rename (Phase 6, Fixes rossoctl#30, closes rossoctl#31). Fork name = canonical name (Option B). Related: epic rossoctl#32, rossoctl#35, rossoctl#37, rossoctl#39. Assisted-By: Claude Code (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Gloire Rubambiza <gloire@ibm.com>
clawgenti
left a comment
There was a problem hiding this comment.
Docs-only spec for the org portability refactor. The design is thorough: the four-fact identity model is well-decomposed, the precedence chain (flag > env > profile > default) is clear, and the staged rollout correctly sequences the fork rename before the script rewire to avoid broken write targets. All checks pass. Ready for human review.
Reviewed by clawgenti using github:pr-review
Addresses clawgenti review nit on PR rossoctl#42: the wrapped continuation rendered as a detached paragraph in markdown. Assisted-By: Claude Code (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Gloire Rubambiza <gloire@ibm.com>
cwiklik
left a comment
There was a problem hiding this comment.
Strong, thorough design spec. The problem statement accurately captures the half-migrated ORG= inconsistency (scanner on rossoctl, fixer/dashboard on kagenti, literals bypassing $ORG), the identity model + precedence rule are clean, and the Step-0 fork-rename ordering analysis (drain report PRs → rename → deploy Step-2 scripts, minimizing the 404 window) is careful and correct. Coherent with the #38 allowlist work.
Two non-blocking design-refinement notes inline — worth nailing during implementation, but nothing blocks recording the spec:
- The
PROFILE_*capture mechanism is under-specified and precedence correctness hinges on it (sourcing a profile with literalORG=would clobber env before resolution). REPOS_DIR/REMAPlack the--flagtier the universal precedence statement implies — clarify if intentional.
Docs-only, DCO green, both commits signed, no .claude/.vscode. LGTM.
Assisted-By: Claude Code
Addresses cwiklik non-blocking review notes on PR rossoctl#42: - Specify PROFILE_-prefixed profile files so sourcing cannot clobber an env-provided ORG before precedence resolves (adds a Profile capture mechanism section + example; updates loader pseudocode and diagram). - Clarify flag-tier scope: add --repos-dir flag (durable knob); REMAP stays profile-only/transitional (self-retires via rossoctl#37). Assisted-By: Claude Code (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Gloire Rubambiza <gloire@ibm.com>
Summary
Adds the design spec for the org portability refactor — a single source of org truth so the
scanner/fixer suite can be pointed at any org by touching one file, with the rossoctl rename
(Phase 6) as the first consumer.
Docs-only. Committed to
docs/specs/for traceability of major design decisions.Design in brief
config/org.env) + aprogram-lib.shloader that resolvesORG,FORK_OWNER,MAIN_REPO,REPOS_DIRby precedence (--flag > env > profile > default).vars — no script carries an org literal.
config/core-repos.txtbecomes bare names (owner derived from$ORG); one shared list.FORK_OWNER/<canonical>, one-time rename ofclawgenti/kagenti→clawgenti/rossoctl.REMAP(clone-dir basename → canonical) lives in the profile and self-retiresonce host dirs are renamed (chore: Rename clone dirs to canonical names and retire the remap shim #37).
Rollout
Staged to protect the live report/dashboard write paths: fork rename (with a precondition to drain
the open fork→main report PRs first) → add the seam with zero behavior change → rewire scripts
(this is Phase 6,
Fixes #30, closes #31) → dry-run parity + controlled live run → deploy.Scope
This PR is the spec only; implementation lands in follow-up PRs (natural boundary: seam vs. rewire).
Related: epic #32, #35, #37, #39.
Assisted-By: Claude Code