Repository navigation
fm-pr-merge: accept a sibling-branch PR once the recorded PR has merged - #15
Merged
Merged
Conversation
…as merged A task that opens several PRs for itself on branches fm/<id>, fm/<id>-b, fm/<id>-c... was bound to only one pr= at a time: once the first merged, fm-pr-merge.sh still refused every later PR as a foreign rebind, even after fm-pr-check.sh --adopt-external, because its own internal re-recording call ran without --adopt-external. require_recorded_pr_identity now accepts a later PR when the recorded PR has already landed (read live via the same provider record readers fm-crew-state.sh uses) and the new PR's own branch is a sibling of the task's recorded branch (fm_pr_task_branch_family_member, bin/fm-pr-lib.sh). A branch that is not a sibling, or a recorded PR that has not landed yet, still refuses exactly as before. record_pr_metadata passes --adopt-external only for this proven sibling-branch case. fm-pr-check.sh's own branch guard also accepts a sibling branch without --adopt-external, since it is never "outside this task". Tests: three new cases in tests/fm-pr-merge.test.sh covering accepted, still-open, and foreign-branch rebinds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Firstmate spec
Uma tarefa pode abrir vários PRs em branches próprias (
fm/<id>,fm/<id>-b,fm/<id>-c...).bin/fm-pr-merge.shmergeava só o primeiro PR registrado (pr=no meta) e recusava os outros com "task is bound to , not ", mesmo depois debin/fm-pr-check.sh <id> <url> --adopt-external, porque o check interno do merge rodava sem--adopt-external.require_recorded_pr_identityagora aceita um PR seguinte quando o PR registrado já está integrado (lido ao vivo, nunca confiando só nopr=gravado) e o PR novo é da própria tarefa (fm/<id>oufm/<id>-<sufixo>,fm_pr_task_branch_family_memberembin/fm-pr-lib.sh). PR de outra tarefa ou branch alheia continua recusado.record_pr_metadatapassa--adopt-externalsó para esse caso provado de branch irmã;fm-pr-check.shtambém aceita uma branch irmã sem--adopt-externalno seu próprio guard.Mantidas todas as outras guardas: verde no head, required checks, draft, mergeable, registro do merge.
Prova
Prova: só contrato headless (
tests/fm-pr-merge.test.sh: 108 testes, 0 falhas, incluindo 3 novos casos - aceito/ainda-aberto/branch-alheia;tests/fm-pr-check-security.test.sh: 48 testes, 0 falhas); NÃO verificado no jogo (não é projeto lloegrys-live).shellcheck/bin/fm-lint.shlimpo embin/fm-pr-check.sh,bin/fm-pr-lib.sh,bin/fm-pr-merge.sh,tests/fm-pr-merge.test.sh.Retro
Erro: nenhum erro ou obstáculo repetido nesta tarefa - a implementação seguiu o
## Firstmate specde primeira, sem correções recebidas.Retro: nada a encodar.