[K5 correction] Create exact-head PRs through Forgejo AGit #25

Merged
adrian.tkacz merged 2 commits from issue-24-agit-pr into develop 2026-09-27 15:41:02 +00:00
Member

Implements #24 as a separate correction after foundation PR #22 was integrated into develop; probe PR #23 remains DO NOT MERGE evidence only.

  • Replace snapshot-branch PR creation with exact full-SHA AGit push to refs/for/<base> using a fresh durable Operation topic push option; no ordinary mutable source branch for the PR effect.
  • Require a new-PR domain receipt and authoritative PR read-back of repository, base ref, identity and current full head; preserve observed base SHA as provenance and fail closed on collisions, uncertain delivery or moved head.
  • Update shared fake/reference conformance, transport tests and public Forge contract. No merge/deploy effect or core AGit payload.

Exact final HEAD 723fcfa9f5748c5629a486960ee17ea2c116daf8: make check passed (490 tests; lock/format/lint/basedpyright/imports/secrets/diff), make package-check passed; Forgejo CI run #2003 succeeded. A fresh verified independent full-PR review at this HEAD returned substantive APPROVE and zero blockers: #25 (comment) . Forgejo persisted COMMENT because the shared kilo account authored the PR; no formal platform approval is claimed. Delivery ledger and 1/10 remediation count: #24 (comment) . No second live AGit probe was run, as prohibited by #24. READY_FOR_OWNER_MERGE; do not auto-merge or close #24 until owner integration.

Implements #24 as a separate correction after foundation PR #22 was integrated into `develop`; probe PR #23 remains DO NOT MERGE evidence only. - Replace snapshot-branch PR creation with exact full-SHA AGit push to `refs/for/<base>` using a fresh durable Operation topic push option; no ordinary mutable source branch for the PR effect. - Require a new-PR domain receipt and authoritative PR read-back of repository, base ref, identity and current full head; preserve observed base SHA as provenance and fail closed on collisions, uncertain delivery or moved head. - Update shared fake/reference conformance, transport tests and public Forge contract. No merge/deploy effect or core AGit payload. Exact final HEAD `723fcfa9f5748c5629a486960ee17ea2c116daf8`: `make check` passed (490 tests; lock/format/lint/basedpyright/imports/secrets/diff), `make package-check` passed; Forgejo CI run #2003 succeeded. A fresh verified independent full-PR review at this HEAD returned substantive `APPROVE` and zero blockers: https://forgejo.creatidy.com/Creatidy/creatidy-kernel/pulls/25#issuecomment-12095 . Forgejo persisted `COMMENT` because the shared `kilo` account authored the PR; no formal platform approval is claimed. Delivery ledger and 1/10 remediation count: https://forgejo.creatidy.com/Creatidy/creatidy-kernel/issues/24#issuecomment-12096 . No second live AGit probe was run, as prohibited by #24. READY_FOR_OWNER_MERGE; do not auto-merge or close #24 until owner integration.
fix: create exact-head Forgejo PRs through AGit
All checks were successful
ci / check (pull_request) Successful in 28s
9663fe754b
kilo left a comment

PR Review: [K5 correction] Create exact-head PRs through Forgejo AGit (#25)

Repository: Creatidy/creatidy-kernel
Branch: issue-24-agit-pr -> develop
Frozen head: 9663fe754b
Linked issue: #24

Summary

The exact-SHA AGit creation shape, authoritative repository/base/head read-back, base-tip provenance, no-blind-retry guard, and adapter boundary are substantially present. Two issue acceptance requirements remain unsatisfied at this frozen head: producer-shaped nonzero AGit rejections are not classified, and later head movement is surfaced as an exception rather than stale evidence.

Intent / Acceptance Evidence

Issue #24 criterion Evidence at frozen head Result
Exact full SHA to refs/for/<base>; no ordinary branch forgejo_transport.py:399-460 constructs the exact-SHA refspec Satisfied
New-PR receipt plus authoritative repository/base/head read-back forgejo_transport.py:473-488, forgejo.py:373-391 Satisfied structurally
Base SHA is provenance, not authority core/forge.py:111-116 and read-back receipt Satisfied
Lost/ambiguous response is not blindly retried forgejo.py:303-304,357-375 Satisfied
Collision/update, permission, and unsupported outcomes remain distinct Nonzero porcelain is not parsed; see blocker 1 Not satisfied
Later moved head makes exact-head evidence stale Reconciliation raises ForgeConflict; see blocker 2 Not satisfied
No merge/deploy effect; dependency direction preserved No merge capability and AGit payload remains adapter-local Satisfied
Shared synthetic conformance Present, but it encodes the stale exception and lacks producer-shaped nonzero porcelain Partial
Required validation Forgejo run #2002 reports success at this SHA; PR reports make check (486 tests) and make package-check Satisfied, with job-detail endpoint unavailable

Architecture / Information Flow

The change keeps AGit-specific transport details in adapters and does not introduce a core dependency on Forgejo. Exact candidate and repository/base authority are read back before acknowledgement. The blockers concern domain-status normalization at the adapter boundary, not dependency direction.

Blocking Issues

  1. Nonzero AGit porcelain rejection evidence is discarded. In src/creatidy_kernel/adapters/forgejo_transport.py:467-472, any nonzero git push --porcelain result is classified only from stderr, then returns UNKNOWN before parsing stdout. Git reports proc-receive failures through porcelain status lines such as [remote rejected] (...); same-topic/non-fast-forward updates, unsupported AGit, and some permission failures can therefore collapse into UNKNOWN rather than the distinct rejected/collision/unsupported outcomes required by issue #24. tests/test_forge_transports.py:317-329 uses stderr-only fixtures and does not cover producer-shaped nonzero porcelain.

  2. A later moved PR head is not returned as stale evidence. src/creatidy_kernel/adapters/forgejo.py:379-388 (and the fake equivalent) raises ForgeConflict when authoritative read-back finds a changed head. tests/test_forge.py:315-339 explicitly expects that exception. Issue #24 requires later head movement to make recorded exact-head evidence stale, and EffectStatus.STALE exists for that domain distinction. Return a stale receipt for a previously accepted PR whose current head differs; retain fail-closed behavior during initial acknowledgement.

Non-blocking Suggestions

None.

Questions for the Author

None.

Security / Privacy Notes

Fail-closed handling is preserved, but collapsing known domain rejection evidence into UNKNOWN weakens the operation journal's ability to distinguish safe terminal refusal from ambiguous delivery.

Test / Documentation Gaps

tests/test_forge.py:404-410 verifies random topic uniqueness only. It does not exercise durable topic-to-Operation binding or rejection of reuse after a completed/closed topic, so the shared conformance suite does not fully demonstrate the documented never-reused topic responsibility.

Follow-Up Candidates

None. These gaps are required by issue #24 and belong in this PR.

Overall Recommendation

REQUEST_CHANGES

Blocking findings: 2. Re-review must bind to the remediated exact head.

Forgejo persistence note: the configured kilo identity authored this PR, so Forgejo rejected formal REQUEST_CHANGES with reject your own pull is not allowed. This review is therefore persisted as COMMENT; that state is not a formal approval or change-request review, while the substantive recommendation remains REQUEST_CHANGES.

## PR Review: [K5 correction] Create exact-head PRs through Forgejo AGit (#25) **Repository:** Creatidy/creatidy-kernel **Branch:** issue-24-agit-pr -> develop **Frozen head:** 9663fe754b9cc2ae1f602c9b1e8535a7be23abef **Linked issue:** #24 ### Summary The exact-SHA AGit creation shape, authoritative repository/base/head read-back, base-tip provenance, no-blind-retry guard, and adapter boundary are substantially present. Two issue acceptance requirements remain unsatisfied at this frozen head: producer-shaped nonzero AGit rejections are not classified, and later head movement is surfaced as an exception rather than stale evidence. ### Intent / Acceptance Evidence | Issue #24 criterion | Evidence at frozen head | Result | |---|---|---| | Exact full SHA to `refs/for/<base>`; no ordinary branch | `forgejo_transport.py:399-460` constructs the exact-SHA refspec | Satisfied | | New-PR receipt plus authoritative repository/base/head read-back | `forgejo_transport.py:473-488`, `forgejo.py:373-391` | Satisfied structurally | | Base SHA is provenance, not authority | `core/forge.py:111-116` and read-back receipt | Satisfied | | Lost/ambiguous response is not blindly retried | `forgejo.py:303-304,357-375` | Satisfied | | Collision/update, permission, and unsupported outcomes remain distinct | Nonzero porcelain is not parsed; see blocker 1 | Not satisfied | | Later moved head makes exact-head evidence stale | Reconciliation raises `ForgeConflict`; see blocker 2 | Not satisfied | | No merge/deploy effect; dependency direction preserved | No merge capability and AGit payload remains adapter-local | Satisfied | | Shared synthetic conformance | Present, but it encodes the stale exception and lacks producer-shaped nonzero porcelain | Partial | | Required validation | Forgejo run #2002 reports success at this SHA; PR reports `make check` (486 tests) and `make package-check` | Satisfied, with job-detail endpoint unavailable | ### Architecture / Information Flow The change keeps AGit-specific transport details in adapters and does not introduce a core dependency on Forgejo. Exact candidate and repository/base authority are read back before acknowledgement. The blockers concern domain-status normalization at the adapter boundary, not dependency direction. ### Blocking Issues 1. **Nonzero AGit porcelain rejection evidence is discarded.** In `src/creatidy_kernel/adapters/forgejo_transport.py:467-472`, any nonzero `git push --porcelain` result is classified only from `stderr`, then returns `UNKNOWN` before parsing `stdout`. Git reports proc-receive failures through porcelain status lines such as `[remote rejected] (...)`; same-topic/non-fast-forward updates, unsupported AGit, and some permission failures can therefore collapse into `UNKNOWN` rather than the distinct rejected/collision/unsupported outcomes required by issue #24. `tests/test_forge_transports.py:317-329` uses stderr-only fixtures and does not cover producer-shaped nonzero porcelain. 2. **A later moved PR head is not returned as stale evidence.** `src/creatidy_kernel/adapters/forgejo.py:379-388` (and the fake equivalent) raises `ForgeConflict` when authoritative read-back finds a changed head. `tests/test_forge.py:315-339` explicitly expects that exception. Issue #24 requires later head movement to make recorded exact-head evidence stale, and `EffectStatus.STALE` exists for that domain distinction. Return a stale receipt for a previously accepted PR whose current head differs; retain fail-closed behavior during initial acknowledgement. ### Non-blocking Suggestions None. ### Questions for the Author None. ### Security / Privacy Notes Fail-closed handling is preserved, but collapsing known domain rejection evidence into `UNKNOWN` weakens the operation journal's ability to distinguish safe terminal refusal from ambiguous delivery. ### Test / Documentation Gaps `tests/test_forge.py:404-410` verifies random topic uniqueness only. It does not exercise durable topic-to-Operation binding or rejection of reuse after a completed/closed topic, so the shared conformance suite does not fully demonstrate the documented never-reused topic responsibility. ### Follow-Up Candidates None. These gaps are required by issue #24 and belong in this PR. ### Overall Recommendation REQUEST_CHANGES Blocking findings: 2. Re-review must bind to the remediated exact head. Forgejo persistence note: the configured `kilo` identity authored this PR, so Forgejo rejected formal `REQUEST_CHANGES` with `reject your own pull is not allowed`. This review is therefore persisted as `COMMENT`; that state is not a formal approval or change-request review, while the substantive recommendation remains REQUEST_CHANGES.
fix: classify AGit rejection and stale PR evidence
All checks were successful
ci / check (pull_request) Successful in 29s
723fcfa9f5
kilo left a comment

PR Review: [K5 correction] Create exact-head PRs through Forgejo AGit (#25)

Repository: Creatidy/creatidy-kernel
Branch: issue-24-agit-pr -> develop
Frozen head: 723fcfa9f5
Linked issue: #24

Summary

The whole correction PR satisfies issue #24 at this exact head. It replaces snapshot-branch PR creation with an exact full-SHA AGit push, validates a new-PR domain receipt, authoritatively reads back repository/base/head identity, preserves base-tip provenance, fails closed on uncertainty, and exposes later head movement as stale evidence. The two blockers from the stale 9663fe7 review are remediated.

Intent / Acceptance Evidence

Issue #24 criterion Evidence at frozen head Result
Exact SHA to refs/for/<base>; no ordinary mutable source branch forgejo_transport.py:380-460; transport fixture asserts the full-SHA refspec and absence of HEAD/force options Satisfied
New-PR receipt plus authoritative repository/base/head read-back forgejo_transport.py:464-500; forgejo.py:343-395; shared repository-identity and mismatch tests Satisfied
Base SHA is provenance, not authority core/forge.py:111-116; moved-base conformance retains the observed base Satisfied
No blind retry after lost/ambiguous delivery forgejo.py:303-304,360-378; recovery requires a durable PR reference; tests retain the reference after temporary read-back loss Satisfied
Collision/update, permission, unsupported, and domain rejection remain distinct forgejo_transport.py:467-499; producer-shaped nonzero porcelain tests cover each reason Satisfied
Later moved head invalidates exact-head evidence forgejo.py:389-390 and fake equivalent return STALE with the durable PR reference Satisfied
Fresh never-reused Operation topic and topic collision refusal forge_refs.py:22-24,124-125; shared tests cover random topics, same-topic update refusal, and completed-topic reuse refusal Satisfied
No merge/deploy effect; dependencies remain inward AGit details remain adapter-local; Forge capabilities add no merge/deploy operation Satisfied
Validation and exact-head CI Issue ledger records make check (490 tests) and make package-check; Forgejo run #2003 succeeded at this SHA Satisfied

Architecture / Information Flow

AGit payload and porcelain parsing remain at the adapter edge. Core retains provider-neutral Effect, Receipt, and EffectStatus values. Acceptance requires both transport-domain creation evidence and authoritative HTTP read-back, so neither a zero Git exit nor an uploaded object alone grants acknowledgement.

Blocking Issues

None.

Non-blocking Suggestions

None.

Questions for the Author

None.

Security / Privacy Notes

The controlled Git environment, bounded output/timeout, exact object validation, disabled ambient Git configuration/hooks/credential helpers, and fail-closed parsing remain intact. No secrets, private payloads, merge authority, or deployment authority are introduced.

Test / Documentation Gaps

No blocking gap. A second live AGit probe was intentionally not run because issue #24 explicitly prohibits it; the README accurately describes the coverage as synthetic adapter conformance rather than a live integration claim.

Follow-Up Candidates

None.

Overall Recommendation

APPROVE

Blocking findings: none. This recommendation applies only to frozen HEAD 723fcfa9f5748c5629a486960ee17ea2c116daf8.

Forgejo persistence note: the configured kilo identity authored this PR, so Forgejo rejected formal APPROVED with approve your own pull is not allowed. This review is therefore persisted as COMMENT; that state is not a formal approval, while the substantive recommendation remains APPROVE.

## PR Review: [K5 correction] Create exact-head PRs through Forgejo AGit (#25) **Repository:** Creatidy/creatidy-kernel **Branch:** issue-24-agit-pr -> develop **Frozen head:** 723fcfa9f5748c5629a486960ee17ea2c116daf8 **Linked issue:** #24 ### Summary The whole correction PR satisfies issue #24 at this exact head. It replaces snapshot-branch PR creation with an exact full-SHA AGit push, validates a new-PR domain receipt, authoritatively reads back repository/base/head identity, preserves base-tip provenance, fails closed on uncertainty, and exposes later head movement as stale evidence. The two blockers from the stale `9663fe7` review are remediated. ### Intent / Acceptance Evidence | Issue #24 criterion | Evidence at frozen head | Result | |---|---|---| | Exact SHA to `refs/for/<base>`; no ordinary mutable source branch | `forgejo_transport.py:380-460`; transport fixture asserts the full-SHA refspec and absence of `HEAD`/force options | Satisfied | | New-PR receipt plus authoritative repository/base/head read-back | `forgejo_transport.py:464-500`; `forgejo.py:343-395`; shared repository-identity and mismatch tests | Satisfied | | Base SHA is provenance, not authority | `core/forge.py:111-116`; moved-base conformance retains the observed base | Satisfied | | No blind retry after lost/ambiguous delivery | `forgejo.py:303-304,360-378`; recovery requires a durable PR reference; tests retain the reference after temporary read-back loss | Satisfied | | Collision/update, permission, unsupported, and domain rejection remain distinct | `forgejo_transport.py:467-499`; producer-shaped nonzero porcelain tests cover each reason | Satisfied | | Later moved head invalidates exact-head evidence | `forgejo.py:389-390` and fake equivalent return `STALE` with the durable PR reference | Satisfied | | Fresh never-reused Operation topic and topic collision refusal | `forge_refs.py:22-24,124-125`; shared tests cover random topics, same-topic update refusal, and completed-topic reuse refusal | Satisfied | | No merge/deploy effect; dependencies remain inward | AGit details remain adapter-local; Forge capabilities add no merge/deploy operation | Satisfied | | Validation and exact-head CI | Issue ledger records `make check` (490 tests) and `make package-check`; Forgejo run #2003 succeeded at this SHA | Satisfied | ### Architecture / Information Flow AGit payload and porcelain parsing remain at the adapter edge. Core retains provider-neutral `Effect`, `Receipt`, and `EffectStatus` values. Acceptance requires both transport-domain creation evidence and authoritative HTTP read-back, so neither a zero Git exit nor an uploaded object alone grants acknowledgement. ### Blocking Issues None. ### Non-blocking Suggestions None. ### Questions for the Author None. ### Security / Privacy Notes The controlled Git environment, bounded output/timeout, exact object validation, disabled ambient Git configuration/hooks/credential helpers, and fail-closed parsing remain intact. No secrets, private payloads, merge authority, or deployment authority are introduced. ### Test / Documentation Gaps No blocking gap. A second live AGit probe was intentionally not run because issue #24 explicitly prohibits it; the README accurately describes the coverage as synthetic adapter conformance rather than a live integration claim. ### Follow-Up Candidates None. ### Overall Recommendation APPROVE Blocking findings: none. This recommendation applies only to frozen HEAD `723fcfa9f5748c5629a486960ee17ea2c116daf8`. Forgejo persistence note: the configured `kilo` identity authored this PR, so Forgejo rejected formal `APPROVED` with `approve your own pull is not allowed`. This review is therefore persisted as `COMMENT`; that state is not a formal approval, while the substantive recommendation remains APPROVE.
adrian.tkacz deleted branch issue-24-agit-pr 2026-09-27 15:41:02 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Creatidy/creatidy-kernel!25
No description provided.