feat: prepare fixed empty public Codeberg target without overwriting #15
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/codeberg-fixed-public-target"
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?
Prepare only the fixed xtrape-project/linux-ops-widget-nodejs empty public Codeberg target when authorized distribution cannot read that Git target. Current real probe11787/job18761 used Owner-supplied username, skipped self-identity API, and still reported NOT_FOUND_OR_NOT_VISIBLE/writes0; this is NOT absence proof.
Four control files. Exact public repository/main/sourceSHA/issuer checks precede network. Fixed repo metadata GET200 validates exact full_name/public/cloneURL and never modifies existing content/config. Only404 allows one atomic fixed-org/name POST privatefalse/auto_initfalse/defaultbranchmain. Definitive409 conflict always rejects; all other3xx/4xx also reject (401/403 separately), with NO success reconciliation or secondPOST. Only transport/unknown5xx uncertainty permits readonlyGET reconciliation of exact empty public metadata, never POST retry. Successful preparation additionally requires anonymous Git readback; no source push, mirror/tag/image operation, existing visibility/permission edit or host2 deployment. HTTPS/no proxy/no redirect/15s1MiB bounds, fixed errors only, responses closed, token only ephemeral Header, no profile/login/raw error retention. Shares Codeberg delivery concurrency.
Validation: final63external tests PASS host and Node24Bookworm with ResourceWarning as error, including explicit409 with subsequent public-empty/nonempty metadata still rejecting, other client rejections,5xx/timeout onePOST readback, private/wrong identity/auth/source refusal, and real local bareGit empty-target anonymous readback. Node24pnpm10.28.2 frozen install/lint/typecheck/build/22files348product tests PASS before this Python-only conflict refinement; product/workflow bytes unchanged by that refinement, final Python tests rerun. Actual new HEAD CI remains required. Author self-review/diff PASS. No real target create/write yet.
Canonical AGENTS.md; docs293C4/49514; external_source.py; Forgejo CreateRepoOption/createOrgRepo schema. HEAD
9771b21205/ base45bd8a12e4940f83d2ec97dd4852287b385c0c5b. Formal review5417 requested change addressed by definitive-conflict refusal; new exact-head nonauthor final review required, old review cannot authorize merge.EXTERNAL-CODEBERG-FIXED-EMPTY-TARGET-20261019 — independent non-author formal REQUEST_CHANGES, exact HEAD
410375b27d/ base45bd8a12e4, author codex. Reviewed actual four-file diff: release/external_codeberg_target.py and 14-case tests, main-only manual .forgejo/workflows/external-codeberg-target.yml and PR test CI. Fixed source/main/SHA/issuer checks, one fixed org repo GET, protected new public empty POST body, no patch/delete/rights changes, token in ephemeral fixed HTTPS auth header, no redirects/proxies, timeout/size and redaction, shared Codeberg concurrency and anonymous Git empty-ref check are correctly bounded. Blocking finding: a definitive HTTP409 Conflict from atomic CREATE is treated as generic CODEBERG_CREATE_UNCONFIRMED, then the exception handler performs a GET; if another principal's same-name public empty repo is visible, code returns CREATE_RECONCILED_EMPTY_PUBLIC_TARGET (success). Owner explicitly requires same-name conflict refusal, not merely absence of overwrite, and a 409 does NOT prove that our POST created the repo. Existing tests exercise 409→GET200 nonempty rejection but omit 409→GET200 public-empty; add that negative. Minimal fix: branch explicitly on status==409 and fail closed with fixed CODEBERG_CREATE_CONFLICT regardless of follow-up GET (optional read-only reconciliation for diagnostics may be retained but never classify this definitive conflict as successful creation). Preserve timeout/transport-uncertain read-only reconciliation without POST retry; do not change fixed target/source/empty/visibility/permission protections. Also note code returns success on existing public target by design without claiming creation or Git write ability; self-identity and external target visibility are separate. Author-reported 61 tests and Node24 product 348 PASS are local evidence, inaccessible for independent rerun or server CI; no real Codeberg write performed. New exact HEAD, CI and fresh non-author review required after fix. No merge, dispatch, secret/permissions change, external delivery or Host2 deployment.Author finding response to review5417: new HEAD
9771b21205fails closed immediately on definitive409 with CODEBERG_CREATE_CONFLICT, including409 followed by otherwise-valid public-empty metadata; all other definitive3xx/4xx reject without reconciliation. Only transport/5xx uncertainty retains onePOST+GET readback.63tests PASS host/Node24Docker, diff/self-review PASS. No real external create. Requesting fresh independent review; not self-approving.EXTERNAL-CODEBERG-FIXED-EMPTY-TARGET-20261019-R2 — independent non-author APPROVED on NEW exact HEAD
9771b21205/ base45bd8a12e4, author codex. Previous REQUEST_CHANGES review5417 is not reused. Directly inspected new release/external_codeberg_target.py and tests vs prior head: 5417 finding RESOLVED. After a fixed GET404 and ONE POST, definitive POST409 now immediately raises CODEBERG_CREATE_CONFLICT and is excluded from reconciliation; other definite 3xx/4xx immediately CODEBERG_CREATE_REJECTED (401/403 separately ACCESS_REJECTED), with no further GET reclassification or repeat POST. Only transport-uncertain errors and 5xx proceed to exactly one read-only GET, require status200, exact public fixed full_name/clone URL and empty=true; otherwise refuse. Tests explicitly cover 409 even with visible empty/nonempty target, 301/302/307/400/404/422/429 refusal, uncertain/5xx reconciliation with nonempty refusal. Fixed source/main/SHA/issuer, org/name, private=false/auto_init=false/default_branch=main, token-limited fixed HTTPS/no proxy/redirect, anonymous Git readback and shared Codeberg concurrency remain unchanged. Important: resolving uncertain writes to matching empty public repository is only bounded reconciliation, not proof of which actor created it or a general authorization to change any existing repo. Author-reported 63 tests in host/Node24 ResourceWarning-as-error mode and earlier 348 product assertions are not reviewer-executed current CI; true external create/publish has NOT occurred. New exact-head CI and gated merge required. No merge/dispatch/secret/rights changes/Host2.Author Merge Readiness Confirmation — codex. Current exact HEAD
9771b21205/ base45bd8a12e4. Independent non-author final APPROVED5418 resolves5417 definitive-conflict finding; old5417 is stale/dismissed. All5 exact-head CI checks success, no open blocker or unresolved request, branch permits merge and no extra protection rule.63external tests host/Node24 and actual product348 validation/self-review recorded. Scope only fixed new empty public Codeberg target preparation; no existing repo visibility/permissions changes, no source publication claim, no host2. After merge any real prepare requires separate history/intent/one-shot dispatch and readback.