Skip to content

Run breaking and changelog from one entrypoint - #215

Merged
reuvenharrison merged 2 commits into
mainfrom
unified-entrypoint
Nov 15, 2026
Merged

reuvenharrison merged 2 commits into
mainfrom
unified-entrypoint

Conversation

@reuvenharrison

@reuvenharrison reuvenharrison commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Follows #214.

breaking and changelog had separate entrypoints, 930 lines between them, with five helper functions that were identical apart from four strings. #214 had to make every change twice. They now share one script, breaking/entrypoint.sh (776 lines): the helpers exist once and each action keeps its own flow.

No behavior change. Both uses: paths, every input, every output and every default are as they were.

What changed underneath:

  • One Dockerfile. changelog/action.yml sets image: '../breaking/Dockerfile'. The path resolves relative to the metadata file and the build context is the Dockerfile's directory.
  • OASDIFF_ACTION_COMMAND, set by each action.yml under runs.env, says which flow runs. It is not an input, so a workflow cannot set it.
  • Inputs come from INPUT_*, the environment variables GitHub passes to a Docker action, and args is gone from both action.yml files. The two actions took 17 and 18 positional arguments in different orders (position 3 was fail-on in one and include-path-params in the other), which a shared script could not read safely. Hyphens survive in the variable name, so oasdiff-token is INPUT_OASDIFF-TOKEN and is read with printenv. This also takes both tokens off the docker run command line.

How it was checked

A differential run of the old entrypoints against the new one, same inputs, comparing stdout, stderr, exit code, $GITHUB_OUTPUT, the step summary, the output file and every request the script sent (comment, commit status, delivery report):

runs compared: 945   differing: 0

45 spec pairs (43 sampled from the oasdiff fixtures, one with no changes, one that fails to load) across 21 input combinations: fail-on, review: false, no token, a rejected comment with and without a fork, flatten-allof, exclude-elements, output-to-file, formats, level, prefixes, and the Pro path with and without a GitHub token. oasdiff --open and curl were stubbed so nothing left the machine; every other oasdiff call was the real v1.38.0 binary.

Two differences the first run reported were in the harness, not the scripts: oasdiff writes error_count, warning_count and info_count to $GITHUB_OUTPUT in map order, which varies between two runs of the same script, and one log line prints a temp path.

The stub-based jobs that called the entrypoints with positional arguments now set INPUT_* instead.

One thing outside this repo: the release automation listed each action's Dockerfile by name, including changelog/Dockerfile. It has been changed to read the list from the repository.

🤖 Generated with Claude Code

reuvenharrison and others added 2 commits November 15, 2026 19:45
The two actions had separate entrypoints, 930 lines between them, whose
helpers were identical except for four strings. They now share
breaking/entrypoint.sh: the helpers exist once, and each action keeps its
own flow, so nothing either one prints, outputs or exits with changes.

changelog/action.yml points at ../breaking/Dockerfile, and each action.yml
sets OASDIFF_ACTION_COMMAND to say which flow runs.

Inputs are read from the INPUT_* environment variables GitHub passes to a
Docker action, not from positional arguments. The two actions took 17 and
18 arguments in different orders, so a shared script reading positions
would have been one misordered line from passing a token as a flag. It
also takes both tokens off the docker command line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The runner's sh is dash, which drops environment variables whose names
contain a hyphen, so INPUT_GITHUB-TOKEN never reached the script. The
action's container runs busybox ash, which keeps them, as bash does.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Base automatically changed from pr-comment-lists-changes to main November 15, 2026 18:33
@reuvenharrison
reuvenharrison merged commit df8c1cc into main Nov 15, 2026
41 checks passed
@reuvenharrison
reuvenharrison deleted the unified-entrypoint branch November 15, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant