Feature 10: import git repositories (docs/features/10) #22
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!22
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/repo-import"
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?
Implements Feature 10 per issue #21 plan + R1 (R1 normative on conflict).
New package internal/repoimport (NOT internal/import — Go keyword, R1 B1): RouteProvider on both lanes (POST /api/v1/repos/imports + browser twin → 202 + task; GET /api/v1/repos/imports/{id} + twin, JSON or SSE attach from the id-keyed replay ring), task kind repo-import on the core wal TaskTable via opsTasks-style wiring (RegisterKind panics on duplicate; no maintain.RegisterKind — does not exist), CLI walhub import --url through the same Service.
Task flow: scratch git clone --mirror → for-each-ref enumerate + S4 refmap → ingest via existing publish path (tier-0 packs + tier-2 base, with the .idx discipline AddPack lacks) → manifest PutCreate commit point → importer-admin via identity service → default policy (absent = default) → import.json provenance Create. B2 params-aware join-or-409, B3 409 on foreign manifest, S1 du-gate caps, S3 dynamic host-pinned credential argv, S8 timeouts, import.max_concurrent=2. Credentials never stored (params/packets/errors/logs/bucket grep-clean); embedded-URL creds refused 400; ssh/scp/git transports refused 400 in v1; SSRF defaults (deny-private, allowlist, allow_file_urls=false) + dangerous confirm.
UI /import page (form → running → done/error) + web/sdk/src/import.js, dark AND light, server-enforced gating; GitHub-shorthand normalize; LFS-as-pointers notice. EVIDENCE E11 (single-pack fixture, 6 GETs + 12 control PUTs + 0 LISTs flat across S/M). meta/import.json joins the frozen overwritable list + endpoints[] via api.RegisterExposed in the same change (law 12). Feature doc docs/features/10_git_import.md with Decisions recording every R1 resolution.
No list endpoint, no DELETE (cut in R1). Do NOT merge — review requested.