gunk-dev/the-valley
the-valley:oc-ba36c29outcomeopen

Bringing a repository in from GitHub or elsewhere is a short, guided path

State
free to start
Created
2026-11-17 by contributor
Progress
3 of 4 done
Children

Body

A critical user journey, named by the operator: someone with a repository on GitHub (or any git host) migrates or forks it into a valley, and it is slick enough to be part of getting started. This knot collects what the journey costs today, observed while moving real repositories; notes are added as the moves proceed.

What a migration takes today, in order, and where it drags:

1. **Declare the project.** An entry in the host's declaration, landed as a reviewed change, then a host converge. Nothing can be tried before the host has rebuilt.
2. **Seed `main`.** With the integrator as the only writer, the first `main` is a local write on the host as the git user: clone bare, chown, fetch into the bare repository. Three privileged commands per project, typed by hand, outside every record the valley keeps. There is no `import <url>` verb.
3. **An empty project is noisy.** Until seeded, its restacker logs a failure every few minutes.
4. **Policy files.** The project needs `policy/project`, `policy/read` and `policy/valley` before its changes are checked or anyone can read it. Nothing scaffolds them or proposes classes from the tree.
5. **Checks.** Tests that live as CI workflow steps must become nix flake checks. An agent did this in 7 to 22 minutes per repository for five repositories. What resisted: browser tests needing a browser build outside nixpkgs; an Android build that fetches from Maven at build time and has no hermetic form without a locked dependency set; container smoke tests that had to be re-expressed without a container daemon.
6. **Issues and pull requests.** Open issues become knots by hand. A public read grant publishes knots too, so imported text needs an audit for names first. No importer exists.
7. **Consumers.** Everything that fetched the old URL (flake inputs, self-update sources, webhooks) is repointed one consumer at a time.
8. **Automation with credentials.** Deploys, DNS sync, preview environments and dependency-update bots have no counterpart: the valley checks a change and cannot run a job holding a secret. A migration that includes deploys stalls here or builds a stopgap.
9. **The old home.** Archiving the source, or keeping it as a push mirror, is a separate manual step with its own permissions.

Questions the journey raises:

- Is declaring a project necessarily a host rebuild, or can a valley admit a project at run time?
- Should import be one verb that seeds `main` from a URL through the valley's own record, with history or as a snapshot?
- Fork and migrate differ in what happens upstream afterwards: a fork keeps following its source, a migration retires it. Does the valley model an upstream?
- Declaring a protected project also extends the check worker's signing scope to it by default. A guided path should say so when it happens.
- What does the first five minutes look like for someone with one GitHub repository and no host yet?

Comments

  1. contributor2026-11-17 18:46 UTC
    Note from moving a client into an existing project as a subdirectory (a different shape from a whole-repository migration): the design took a critic round, a dependency-boundary rule and check landed first (three review rounds), and the import brief ran to about 1,200 words covering snapshot reproduction, module path rewrite, repackaging, re-homing checks, scrubbing names and re-pointing the tool's own updater. Bringing a repository in as a directory of another project is its own journey and has no tooling.
  2. contributor2026-11-17 19:51 UTC
    Declaring a project did not make it usable: the host had built the new configuration but staged it behind a reboot (kernel change), so the repositories did not exist yet and the seed step failed with nothing saying why from the client side. A new project waited on a host reboot, and the reboot also stops everything else the host runs. Wanted: the declaring client can see "declared, not yet applied, waiting on X", and creating a project does not depend on an unrelated system restart.
  3. contributor2026-11-18 22:03 UTC
    After the seed, on the client side: each existing clone still had the old host as origin, so before any work could be delivered the remote was renamed and the valley added as origin by hand, per clone (rename, add, fetch, set-head, set upstream: five git commands). Nothing offers 'this clone now lives here'. A seeded project whose main carries no policy/valley answers valley pending with 'main names no owning valley', so the first change every migrated project needs is the one adding its policy files, and whether that change can be readied and approved through the ordinary path, or needs a second privileged write on the host, is not stated anywhere a migrating user would look. A seed that wrote policy/valley itself would remove the question.
  4. contributor2026-11-18 22:25 UTC
    Confirmed: the first policy change of a seeded project cannot be approved. Review offers approve, and approve declines with 'main names no owning valley at policy/valley; nothing derived'. The change that would add policy/valley is judged by a main that lacks it, so every migrated project needs a second privileged write on the host to move main onto its first policy commit, and the ready change is left behind unlanded. Also found on the way: the instance floor requires a prose-format check by name, and a migrated project's flake does not define one, so after the policy lands any Markdown or unclassified change requires a check nothing can build until the project adds it (and reformats its Markdown). A seed or import that writes policy/valley, and a floor check a project can take from the platform instead of copying, would remove both.
  5. contributor2026-11-18 23:33 UTC
    Removing a check takes two changes in a fixed order, and nothing says so: a change is judged by the policy at main, so a change that deletes a flake check the policy at main still requires can never meet its requirements. The requirement has to be dropped in one landed change before the check is removed in the next. A migrated project retiring old checks meets this in its first week. The refusal could name the check that the target's policy requires and the change no longer defines.
  6. contributor2026-11-21 17:09 UTC
    Friction, 2026-11-21, a person fixing a conflicted change with plain git: after 'git rebase' and a force push, 'valley ready' made a new change instead of the next version of the conflicted one, because the change id rides on the commit's change-id header, which git rebase does not carry, and nothing suggested --change. The old change stays under 'moving' as held until withdrawn by hand. A person should either be told 'this branch already has change X; ready as its next version?' or ready should default to the branch's existing change. Also seen the same day: a person committing on a stale local main gets a binary conflict at restack with no hint that the base was behind.
  7. contributor2026-11-25 02:35 UTC
    Friction, registering a project that already lives in a valley with the flow client so agents can work on it: `flow project add` knows only GitHub. A bare name is looked up among the user's GitHub repositories even when `--path` points at an existing checkout, so the command fails for a project GitHub has never held. It succeeds as `<anything>/<name> --path <dir>`: the owner part is required and then ignored, and unless a description is passed the made-up `owner/name` is sent to GitHub to look for one. Without `--path` the clone URL is always a GitHub one, so the checkout is cloned by hand first, from an address the user has to know. Wanted: `--path` registers a checkout without consulting any forge, and `project add <name>` can clone a project from the valley the client already works with.