Skip to content

πŸ›πŸ§‘β€πŸ’» - Branch sync hides missing workflow write capability and aborts after committing its mergeΒ #844

Closed

Description

@efraespada

Is there an existing issue for this?

  • I have searched the existing issues.

Searches covered workflow scope, the exact "refusing to allow" rejection and sync-branch push failures. #746 concerns dependency preparation on the wrong revision; this failure reaches merge/commit and is rejected by workflow-write authorization.

Which actions are affected?

Pull Request

Which platforms are affected?

Linux

Description

A supported /copilot sync-branch merges develop into the admitted consumer branch, creates a local merge commit, then cannot publish it because the configured PAT lacks workflow scope for the changed project CI workflow. The user-facing response is only workflow.failed and "Inspect the current state and retry the failed step." It does not identify the required credential capability or clearly distinguish the unchanged remote branch from the already committed private candidate.

After that push rejection, the recovery calls git merge --abort even though the merge was already committed; Git rejects that command because MERGE_HEAD is absent. This is not a request to force-push, broaden credentials automatically or bypass branch ownership.

Expected: fail with safe actionable workflow-write guidance and exact publication/retained-state facts, and use a recovery path appropriate to a committed isolated candidate. If a preflight cannot prove workflow-write permission, map the explicit remote denial to a bounded maintainer action. Preserve the source and remote branch; never reset a user's checkout or pretend an unpublished commit was pushed.

Reproducing the issue

  • Consumer Domus PR #15, managed branch feature/8-deliver-the-household-entry-interface-for-native-and-standalone-deployments.
  • Original head 695e5c31a466b8a42c8840c46f708141979b35e4; requested develop base a97294385798b31e98c200e7ed93e355ffc7c9a7, after successful PR Detect issue fixΒ #14 merge.
  • Exact supported request: comment 6556702244, containing only /copilot sync-branch.
  • Original run 41297433053 / job 124821122631.
  • The merge completes normally, including auto-merging tests/python/test_ci_contract.py and regenerating specs/CATALOG.md; no code conflict is reported.
  • It creates local candidate 39f69a7 with message "Merge develop into feature/8-deliver-the-household-entry-interface-for-native-and-standalone-deployments".
  • GitHub refuses the normal push because parent integration changes .github/workflows/ci_check.yml and this PAT lacks workflow scope.
  • It then runs merge --abort, which fails after the completed merge commit.
  • Reply 6556708152 reports workflow.failed, retryable yes, reference 6041bb4b-f95c-473d-aff2-4375279b5b4d, without the actionable capability distinction.
  • An independent authoritative ref read after this terminal failure still returns 695e5c31a466b8a42c8840c46f708141979b35e4. No remote update occurred. The consumer has not force-pushed, reset the branch, modified Copilot or retried the unchanged failure.

copilot Version

Referenced reusable workflow vypdev/copilot/.github/workflows/copilot_comment_runtime.yml@v3, ref refs/tags/v3, resolved SHA 3e7ceea08e6131360e026937d1c0cc1b120472e0 in the original run's referenced_workflows metadata. Consumer workflow SHA 8ee7e1a15e91c91b6204ca97e8808c3207dee008.

Relevant Log Output

2026-11-01T10:26:00.7446523Z Automatic merge went well; stopped before committing as requested
2026-11-01T10:26:02.4780982Z [feature/8-deliver-the-household-entry-interface-for-native-and-standalone-deployments 39f69a7] Merge develop into feature/8-deliver-the-household-entry-interface-for-native-and-standalone-deployments
2026-11-01T10:26:03.6822007Z [remote rejected] ... (refusing to allow a Personal Access Token to create or update workflow .github/workflows/ci_check.yml without workflow scope)
2026-11-01T10:26:03.6858385Z git merge --abort
2026-11-01T10:26:03.6963064Z fatal: There is no merge to abort (MERGE_HEAD missing).
2026-11-01T10:26:03.7033150Z Unable to abort the in-progress branch merge cleanly.
2026-11-01T10:26:03.7035044Z Branch synchronization failed.

Additional context and comments

The remote denial is legitimate credential enforcement. The issues here are the missing safe maintainer guidance/publication-state detail and post-commit abort recovery. No token values or private owner data are included. Suggested regression: a conflict-free isolated merge that commits successfully, then receives this explicit workflow-scope rejection; assert original remote head preserved, no force-push, truthful unpublished-candidate state, bounded actionable diagnostics and no misleading merge-abort attempt.

Domus continues its independent journal/UI work on the admitted branch while this is reported. We do not change Copilot code, installed resources, PAT secrets, configuration or validation policy.

Activity

  1. added
    bugSomething isn't working
    bugfixSomething isn't working
    priority: highCritical issue, needs immediate attention.
    on Nov 1, 2026
  2. added theissue type on Nov 1, 2026
  3. moved this to Todo in vypdevon Nov 1, 2026
  4. changed the title [-]Branch sync hides missing workflow-write capability and aborts after committing its merge[/-] [+]πŸ› - Branch sync hides missing workflow write capability and aborts after committing its merge[/+] on Nov 1, 2026
  5. vypbot commented on Nov 1, 2026

    @vypbot
    Contributor

    Hi! I’m @vypbot, the Copilot assistant for this repository.

    I can answer questions, explain the codebase, propose implementation and test plans, review issues and pull requests for potential bugs or security problems, and help authorized maintainers apply changes.

    Try /copilot help to see the available commands, or mention @vypbot with your question.

  6. efraespada commented on Nov 1, 2026

    @efraespada
    MemberAuthor

    Consumer reconciliation follow-up (2026-11-01), preserving the original failure evidence above.

    The reported Action failure remained open while Domus continued independent work. Its next server-context increment created four genuine source conflicts with the already merged task foundation. The owner had explicitly authorized the necessary push and merge operations. I recorded the guide's exceptional-recovery prerequisites, exact ref/base/source, protected-tree identities, resolution, validation and rollback before local reconciliation. No credential, Copilot configuration or acceptance limit was changed and the unchanged failing Action was not retried.

    Exact retained state and operation:

    • Managed ref: refs/heads/feature/8-deliver-the-household-entry-interface-for-native-and-standalone-deployments, existing Domus PR #15, still ready for review.
    • Source: f05fc2d827d90344b468f48ae5e0f1015f0ea97e (server context/assertion increment, already normally published).
    • Parent base: a97294385798b31e98c200e7ed93e355ffc7c9a7 on develop, fetched and verified without modifying the feature parent first.
    • Four additive conflicts: backend/src/domus/composition/ingress.py, backend/src/domus/composition/server.py, backend/src/domus/entrypoints/native_http.py and tests/backend/test_household_http.py. Resolution preserves task services and adds verified entry metadata/assertion wiring. Project OpenAPI/catalog were regenerated from actual combined source.
    • Reconciliation commit: ca55cdb56779573a0dd45b47b9546b74b4ffcc74, parents exactly f05fc2d827d90344b468f48ae5e0f1015f0ea97e and a97294385798b31e98c200e7ed93e355ffc7c9a7.
    • Before publication, the authoritative remote ref was checked to equal f05fc2d. The commit then used a normal fast-forward push to the same ref; GitHub independently reports head ca55cdb and mergeable=true. No remote branch was created, renamed, deleted, force-pushed or replaced. Copilot resources/guidance/workflows are byte-identical in both parents and the reconciled worktree.

    Actual local combined-source verification passed before publication: 2,932 backend tests with all 7,672 statements/2,162 branches covered across 105 modules, independently checked against the filesystem; 147 tooling tests with 214 statements/98 branches covered; 210 actual Chromium cases with every statement/branch/function/line covered on all five frontend runtime modules; 35 Node policy/architecture cases; strict types, architecture/cycle guards, Ruff, docs and the unchanged original SDK's specification format/consistency/catalog checks, preserving all 48 prospective case rows. The UI feature remains incomplete; this is source/integration proof, not owner HA or rendered-product acceptance. Current-head hosted checks/review run separately.

    The original issue still describes the Action's missing workflow-capability guidance and invalid post-commit merge-abort recovery; this consumer reconciliation does not repair those defects. Please retain the original failing run/ref/diagnostics and add regression coverage for truthful publication state after a legitimate GitHub permission rejection. Installed owner Edge.3 and owner household data were not changed.

  7. moved this from Todo to In Progress in vypdevon Nov 3, 2026
  8. added
    branchedIndicates that a branch has been created for this issue.
    on Nov 3, 2026
  9. 2 remaining items

  10. vypbot commented on Nov 3, 2026

    @vypbot
    Contributor

    Implementation plan

    Current status: Ready to start. No action is required from maintainers before implementation.

    1. Define safe failure details
      • Specify the response for explicit workflow-scope push denials, including the required credential capability, unchanged remote head, and unpublished local candidate.
      • Keep guidance bounded to maintainer action; do not broaden credentials automatically or force-push.
    2. Correct committed-candidate recovery
      • Distinguish a completed merge commit from an in-progress merge before recovery.
      • For a committed isolated candidate, preserve its state and avoid `git merge --abort` or resetting the user's checkout.
    3. Report publication state accurately
      • Map the explicit remote denial to actionable diagnostics that identify the failed publication and retained candidate.
      • Never report the candidate as pushed unless the remote ref confirms the update.
    4. Add regression coverage
      • Cover a conflict-free merge that commits locally, then receives the explicit workflow-scope rejection.
      • Assert the remote head remains unchanged, the candidate is identified as unpublished, no force-push or reset occurs, and merge-abort is not attempted.
    5. Document maintainer recovery
      • Document the required workflow-write capability and safe steps to review and publish the retained candidate.

    Acceptance: A regression test simulating the explicit workflow-scope push rejection verifies that the remote head stays at its original commit, the response identifies the required capability and unpublished candidate, and recovery neither force-pushes, resets the checkout, nor runs `git merge --abort` after the merge commit.

    Need something else? Mention the bot with a question or use /copilot help.

  11. added
    size: XXLIndicates an extremely large task or issue that requires significant time and effort to complete.
    85%Progress: 85%
    and removed on Nov 3, 2026
  12. vypbot commented on Nov 3, 2026

    @vypbot
    Contributor

    Issue closed β€” historical progress

    Current status: closed as completed.

    The last estimate is retained below as history. Closure does not certify a new percentage, tests, or branch alignment.

    Action required: none for this closed issue. If work continues, reopen the issue; a fresh assessment can update this same card.

    Last assessment before closure (historical)

    Progress: 85% β€” in progress

    > Current status: [R1] A supported /copilot sync-branch merges develop into the admitted consumer branch, creates a local merge commit, then cannot publish it because the configured PAT lacks workflow scope for the changed project CI workflow. The user-facing response is only workflow.failed and "Inspect the current state and retry the failed step." It does not identify the required credential capability or clearly distinguish the unchanged remote branch from the already committed private candidate. β€” Patches add explicit workflow-write denial classification, nonretryable maintainer guidance, and original, candidate, and observed commit facts in the recovery response.
    [R2] Expected: fail with safe actionable workflow-write guidance and exact publication/retained-state facts, and use a recovery path appropriate to a committed isolated candidate. If a preflight cannot prove workflow-write permission, map the explicit remote denial to a bounded maintainer action. Preserve the source and remote branch; never reset a user's checkout or pretend an unpublished commit was pushed. β€” Patches preserve the committed candidate, avoid postcommit abort/reset and force-push, and report remote observations without claiming an unpublished candidate was pushed. The local Git regression source covers unchanged remote state and retained candidate behavior.
    [R3] The remote denial is legitimate credential enforcement. The issues here are the missing safe maintainer guidance/publicat
    [untrusted content truncated]

    Next: [R3] The remote denial is legitimate credential enforcement. The issues here are the missing safe maintainer guidance/publication-state detail and post-commit abort recovery. No token values or private owner data are included. Suggested regression: a conflict-free isolated merge that commits successfully, then receives this explicit workflow-scope rejection; assert original remote head preserved, no force-push, truthful unpublished-candidate state, bounded actionable diagnostics and no misleading merge-abort attempt. β€” Independent evidence is needed that the scoped regression executes successfully and confirms the original remote head remains unchanged, publication facts are truthful, and no misleading postcommit merge abort occurs.

  13. added a commit that references this issue on Nov 3, 2026
  14. vypbot commented on Nov 3, 2026

    @vypbot
    Contributor

    Issue closed: synchronization recommendation retired

    No branch synchronization is required for this closed issue.

    The previous recommendation is historical. Issue closure does not certify that the branches are synchronized.

  15. added
    100%Progress: 100%
    and removed
    85%Progress: 85%
    in-progressStart work on an admitted issue.
    state:workingWork can proceed on the verified branch or without a branch.
    on Nov 3, 2026
  16. moved this from In Progress to Done in vypdevon Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

100%Progress: 100%branchedIndicates that a branch has been created for this issue.bugSomething isn't workingbugfixSomething isn't workingpriority: highCritical issue, needs immediate attention.size: XXLIndicates an extremely large task or issue that requires significant time and effort to complete.

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions