Skip to content

reconcile-repos.sh produces shim blob without sentinel, creating bogus update PR #2247

@ralphbean

Description

@ralphbean

What happens

PR #2101 was opened by the reconcile bot (fullsend-ai-fullsend[bot]) proposing to remove the --- and # --- fullsend managed below - do not edit --- lines from the fullsend repo's own shim workflow. If merged, the next reconciliation run would detect the sentinel is missing and open another PR to restore it — infinite churn.

But the real question is: why did reconcile-repos.sh produce a blob without the sentinel in the first place? The template at internal/scaffold/fullsend-repo/templates/shim-workflow-call.yaml starts with those two lines, and shim_with_header_b64() uses the template as its base. Something in the content generation or branch-writing path is stripping them.

Where to look

shim_with_header_b64() in reconcile-repos.sh (line 107) constructs the final blob. For repos where the only content above the sentinel is --- (a YAML document separator, not a comment), the injection guard at line 132 rejects it as non-comment content. The function then falls through to returning the raw template — which does include --- and the sentinel. So the function's output should be correct.

That means the stripping happens downstream — either in how the base64 blob is written to the branch via the GitHub API, or in how managed_content_b64() compares content and decides the shim is "stale" when it isn't.

What should happen

reconcile-repos.sh should never produce a PR that removes the sentinel. PR #2101 should not have been created.

Context

Identified by @rh-hemartin and @waynesun09 in PR #2101 review. The review agent also flagged this.

Metadata

Metadata

Assignees

Labels

component/dispatchWorkflow dispatch and triggerspriority/highSignificant impact, address soonready-to-codeTriaged and ready for the code agenttype/bugConfirmed defect in existing behavior

Type

No type
No fields configured for issues without a type.

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions