feat: deliver fixed public Git source without forced writes #10
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/external-source-delivery"
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?
External source distribution needs Git transport access; a REST project-read401 is not itself a Git write verdict. Add a fixed-target, manual public-main workflow with probe/publish modes for same-name xtrape-project repository on four platforms. Each selected job receives only its own existing Secret; optional non-secret publisher usernames have bounded defaults.
Script validates source repository/ref, executing SHA and public Forgejo origin; credentials only target-scoped temporary Git extraHeader, no helper/global/system config/proxy/redirect/hooks or inherited Git controls, no token in argv/URL/config/log. Probe is ls-remote only and does not assert write permission. Publish first requires anonymous target readability and unchanged ref, refuses unrelated history, performs ordinary explicit SHA:main push without force/mirror/automatic retry, reconciles uncertain write via read-only ref query, then anonymous clone/no checkout and exact complete-tree verification. Existing matching target is idempotent. No repository creation, permissions, API/user discovery, tag overwrite or artifact copy. Only public source history, never internal xtrape history/images.
Validation:12 behavior and real local bare-Git tests PASS locally and Node24Docker: full commit/tree/mode preservation, untracked .env exclusion, fast-forward, divergent/non-public target refusal, no write in probe, denied/uncertain write with one push and readback, idempotency, anonymous tree mismatch. Node24Docker20 existing preflight tests and frozen pnpm10.28.2 install/lint/typecheck/build/22 files348 assertions PASS. Author self-review complete; no real external write yet. Git server fast-forward rejection remains the concurrency guard; pre-read is not a remote CAS. Codeberg/Gitee publisher usernames may need existing CI Variables after actual transport evidence; no new privilege presumed.
Canonical inherited AGENTS; xtrape-docs docs/reference/06-versioning-and-release-train.md and docs#293 C4; publication repositories.yaml same-name targets, Owner explicitly enabled all four xtrape-project namespaces. Existing token configuration and latest auth/DNS PR9 remain separate; do not relax gates to turn historical failure green. No Host2.
EXTERNAL-PUBLIC-GIT-DELIVERY-20261019 — independent non-author formal APPROVED at exact HEAD
fb2403935f, base20a256e6c6, author codex. Inspected actual four-file change: manual main-scoped external-source workflow, Python Git transport, 12 tests and PR secret-free test CI. Source must be xtrape-project/linux-ops-widget-nodejs with refs/heads/main, expected SOURCE_SHA equal actual checked-out HEAD, and origin exact fixed public Forgejo URL; four target Git URLs fixed under same-name xtrape-project org. Workflow one platform job with platform-specific existing token and optional nonsecret username only, separate probe(default)/publish modes. Transient process Git env strips inherited GIT_* and trace, disables global/system config, credential helper, hooks, redirects, proxy, terminal prompt, and uses target-URL-scoped HTTP Basic extraHeader; token never in arguments/remote URL/persistent config and Git raw errors suppressed. Probe only ls-remote, makes NO write-authority claim. Before publish: authenticate target refs; separate anonymous ls-remote must be readable and unchanged; reject nonempty without main or unrelated/non-fast-forward main; only explicit sourceSHA:refs/heads/main push, no force/mirror/retries. Failed or uncertain push reconciles via read-only remote SHA, not second push. Post-write uses anonymous shallow no-checkout clone and verifies HEAD tree exactly matches reviewed public checkout, excluding untracked .env; idempotent equal remote skips write. Local bare-Git regression covers success/FF/equal/denied/uncertain/private/diverged/tree mismatch with no secret leaks; author-reported 12 tests and Node24 product suite are not independently re-executed CI. Important operational nuance: local merge-base proof of external old commit requires that commit exist in source checkout's object database; if missing, the code fail-closes with TARGET_NOT_FAST_FORWARD even when external history is genuinely related. This may limit future external updates, but does not permit unsafe publishing and is not a blocker for this bounded first-publication path. External target existence, actual Git write permission and distribution remain UNPROVEN; previous GitHub401/GitLab401 invalid_token and Gitee DNS issues are not declared resolved. New exact-head CI, gated merge and separately authorized real probe/publish still required. No merge, dispatch, access changes or Host2 deployment by reviewer.Author Merge Readiness Confirmation — codex. Exact HEAD
fb2403935f, base20a256e6c6. Official non-author review5412 current and all five current CI contexts successful; no blocker, mergeable and user_can_merge verified.12 real-Git/behavior tests and Node24 product348 PASS. Ordinary fixed public-source FF push only, no force or retry; external writes remain unperformed. Guarded merge exact HEAD; selected Git read-only probes require separate history/intent, no existing secret/permission changes.