Skip to content

fix(ci): fix bash syntax error and regex bug in conventions workflow - #456

Merged
shaneutt merged 2 commits into
praxis-proxy:mainfrom
leseb:leseb/fix-ci-failure
Jun 2, 2026
Merged

shaneutt merged 2 commits into
praxis-proxy:mainfrom
leseb:leseb/fix-ci-failure

Conversation

@leseb

@leseb leseb commented Jun 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes two bugs in the conventions CI workflow:

  1. ai-authorship-check: The gh pr comment --body argument was missing its closing double quote, causing bash to consume the fi and subsequent statements as part of the string literal, failing with unexpected EOF while looking for matching " (exit code 2) on every PR.

  2. signoff-check: The jq regex test("^Signed-off-by: "; "m") never matches multiline commit messages because jq uses Oniguruma, where the "m" flag makes . match newlines — it does not make ^ match at line boundaries (that's PCRE behavior). Changed to the inline (?m) flag so ^Signed-off-by: correctly anchors to the start of any line.

Note: Both checks use pull_request_target, so the broken scripts on main run against this PR — the fixes cannot self-validate until merged.

Signed-off-by: Sébastien Han [email protected]

The gh pr comment --body argument was missing its closing double
quote, causing bash to consume the fi and exit statements as part
of the string literal and fail with unexpected EOF.

Signed-off-by: Sébastien Han <[email protected]>
@leseb
leseb requested a review from a team June 2, 2026 07:59
@praxis-bot

Copy link
Copy Markdown

Missing Signed-off-by: 3b34dba. All commits require sign-off (via git commit --signoff).

@leseb

leseb commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

the workflow uses pull_request_target so it pulls the broken code to test the pr, that's why the workflow continues to fail, after this merges this should be fine

jq uses Oniguruma where the "m" flag makes . match newlines, not
make ^ match at line boundaries (that is PCRE behavior). Use the
inline (?m) flag instead so ^Signed-off-by: matches at the start
of any line in a multiline commit message.

Signed-off-by: Sébastien Han <[email protected]>
@leseb leseb changed the title fix(ci): close unterminated string in ai-authorship-check fix(ci): fix bash syntax error and regex bug in conventions workflow Jun 2, 2026

@alexsnaps alexsnaps left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks right to me afaict

@praxis-bot praxis-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: fix(ci): fix bash syntax error and regex bug in conventions workflow

Overall assessment: Clean, correct, minimal fix for two real bugs. Ship it.

Summary

Both fixes are correct and well-documented:

  1. signoff-check regex ((?m) inline flag): jq uses Oniguruma, where the "m" second argument to test() makes . match newlines (equivalent to PCRE's s flag), but does NOT make ^ match at line boundaries. The inline (?m) flag correctly enables multiline anchoring in Oniguruma, so ^Signed-off-by: matches at the start of any line in a multi-line commit message. Correct fix.

  2. ai-authorship-check closing quote: The --body string opened at line 313 was never closed, causing bash to consume fi, echo, exit 1, and the outer fi as part of the string literal. Every PR that reached this code path failed with unexpected EOF while looking for matching ". Adding the closing " restores the intended if/fi control flow structure.

Findings

Severity Count
Critical 0
Large 0
Medium 0
Small 0
Nit 0

No issues found. The changes are minimal, targeted, and correct.

Notes

  • The other test(...; "i") calls in the ai-authorship-check jq block are not affected by this Oniguruma semantics difference: the "i" (case-insensitive) flag behaves identically across engines.
  • The $CREDIT and $ANY_TRAILER regexes in the ai-authorship block also use ^, but they operate on individual lines from split("\n")[], so start-of-string anchoring is correct there.
  • As the PR notes, both checks use pull_request_target, so the broken scripts on main run against this PR. The fixes cannot self-validate until merged.

@shaneutt
shaneutt merged commit 8656e78 into praxis-proxy:main Jun 2, 2026
20 of 22 checks passed
@shaneutt shaneutt self-assigned this Jun 2, 2026
@shaneutt shaneutt added this to the v0.4.0 milestone Jun 2, 2026
@leseb
leseb deleted the leseb/fix-ci-failure branch June 2, 2026 14:01
leseb added a commit to leseb/praxis that referenced this pull request Jun 3, 2026
leseb added a commit to leseb/praxis that referenced this pull request Jun 3, 2026
shaneutt added a commit that referenced this pull request Jun 4, 2026
* feat(website): add project website

Docusaurus 3 site with landing page, documentation, examples
showcase, and blog.

The website builds and deploys directly from this repository via
GitHub Actions. Docs live in docs/ as the single source of truth.
The site is served at praxis.fast through GitHub Pages.

- Landing page with animated filter pipeline visualization
- Documentation restructured into categories with sidebar icons
- Interactive examples page with 82 YAML configs and overlay viewer
- Blog with editorial post styling
- Local search, responsive design, dark theme
- GitHub Actions workflow for automated deployment on push to main

Fixes praxis-proxy/praxis-proxy.github.io#1

Signed-off-by: Sébastien Han <[email protected]>

* fix(ci): fix bash syntax error and regex bug in conventions workflow (#456)

Signed-off-by: Sébastien Han <[email protected]>

---------

Signed-off-by: Sébastien Han <[email protected]>
Co-authored-by: Shane Utt <[email protected]>
shaneutt pushed a commit that referenced this pull request Jun 8, 2026
* fix(ci): fix bash syntax error and regex bug in conventions workflow (#456)

Signed-off-by: Sébastien Han <[email protected]>

* docs(filter): add build-time filter registry proposal

Propose a build.rs + cargo metadata discovery mechanism
that lets external filter crates self-register into the
FilterRegistry at build time. Operators add a Cargo.toml
dependency and write YAML config with zero Rust code
changes to Praxis.

Signed-off-by: Sébastien Han <[email protected]>

* docs(filter): remove How? section per proposal guidelines

Submit What? and Why? first. How? will be added in a
follow-up after the proposal direction is accepted.
Also add missing discussion field to frontmatter.

Signed-off-by: Sébastien Han <[email protected]>

* docs(filter): address PR review feedback

Remove remaining em-dashes per project conventions.
Clarify that auto-registered duplicates panic because
there is no caller to propagate the Result to, while
manual registry.register() continues to return Result.
Add boundary note distinguishing filter registration
from plugin/hook discovery (#63).

Signed-off-by: Sébastien Han <[email protected]>
mkoushni pushed a commit to mkoushni/praxis that referenced this pull request Jun 10, 2026
mkoushni pushed a commit to mkoushni/praxis that referenced this pull request Jun 10, 2026
* feat(website): add project website

Docusaurus 3 site with landing page, documentation, examples
showcase, and blog.

The website builds and deploys directly from this repository via
GitHub Actions. Docs live in docs/ as the single source of truth.
The site is served at praxis.fast through GitHub Pages.

- Landing page with animated filter pipeline visualization
- Documentation restructured into categories with sidebar icons
- Interactive examples page with 82 YAML configs and overlay viewer
- Blog with editorial post styling
- Local search, responsive design, dark theme
- GitHub Actions workflow for automated deployment on push to main

Fixes praxis-proxy/praxis-proxy.github.io#1

Signed-off-by: Sébastien Han <[email protected]>

* fix(ci): fix bash syntax error and regex bug in conventions workflow (praxis-proxy#456)

Signed-off-by: Sébastien Han <[email protected]>

---------

Signed-off-by: Sébastien Han <[email protected]>
Co-authored-by: Shane Utt <[email protected]>
mkoushni pushed a commit to mkoushni/praxis that referenced this pull request Jun 10, 2026
* fix(ci): fix bash syntax error and regex bug in conventions workflow (praxis-proxy#456)

Signed-off-by: Sébastien Han <[email protected]>

* docs(filter): add build-time filter registry proposal

Propose a build.rs + cargo metadata discovery mechanism
that lets external filter crates self-register into the
FilterRegistry at build time. Operators add a Cargo.toml
dependency and write YAML config with zero Rust code
changes to Praxis.

Signed-off-by: Sébastien Han <[email protected]>

* docs(filter): remove How? section per proposal guidelines

Submit What? and Why? first. How? will be added in a
follow-up after the proposal direction is accepted.
Also add missing discussion field to frontmatter.

Signed-off-by: Sébastien Han <[email protected]>

* docs(filter): address PR review feedback

Remove remaining em-dashes per project conventions.
Clarify that auto-registered duplicates panic because
there is no caller to propagate the Result to, while
manual registry.register() continues to return Result.
Add boundary note distinguishing filter registration
from plugin/hook discovery (praxis-proxy#63).

Signed-off-by: Sébastien Han <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants