Skip to content

BUG: Git delivery: a lost successful comment response duplicates the comment on retry (Codex F8) #451

Closed

Description

@ephico2real2

Part of #286. Found by Codex (another model family) reviewing the Git delivery layer on main b8ee59e (PRs #288, #299), 2026-11-19. Severity per Codex: Low.

Location: cmapi/src/cmapi/core/git/github.py:218–:225; callers jobs/merge.py:52, jobs/delivery.py:131.

The host persists the comment but returns 502, or the worker stops after the POST. The next attempt posts the same comment again. A lease fence only serializes ownership; it cannot roll back a host-side append.

Full fix: read all pages of existing comments and adopt an exact matching body before POST. Update the offline GitHub stub to implement the corresponding GET. Appendix C: core/git/github.py, tests/service/gitserver.py.

Test: test_lost_comment_response_is_adopted_on_retry: fails main with two stored comments; passes fixed with one.

Limit: this fixes sequential retry after response loss. Read-before-POST is not an atomic host idempotency key; two independently authorized concurrent writers could still race. Therefore the patch does not establish universal exactly-once semantics. It also adds a comments-read dependency; live-host permission compatibility was not checked under this no-GitHub-contact review.

Evidence: workbench/cmapi/review-288b/codex-report.md (F8) and its regression test in codex-fixes.patch; Codex ran it failing on main and passing with its fix. Reviewer 2 (OB3) checks the fix and runs the PostgreSQL and SSH checks the sandbox could not, before it is applied.

Activity

  1. added
    bug
    status:open
    sev:low
    Backlog
    on Nov 19, 2026
  2. ephico2real2 commented on Nov 19, 2026

    @ephico2real2
    OwnerAuthor

    Fixed by #458 (merged, CI green), from Codex's review of the Git delivery layer with OB3's corrected fix; the coordinator ran its test failing on main and passing with the fix. GitHub closed only the first Closes line of that PR.

  3. added
    Done
    and removed
    Backlog
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Donebugsev:lowstatus:open

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions