Skip to content

fix(cli): parse job files with a UTF-8 BOM - #115

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
mrfandu1:fix/jobfile-utf8-bom
Sep 16, 2026
Merged

ralyodio merged 1 commit into
profullstack:masterfrom
mrfandu1:fix/jobfile-utf8-bom

Conversation

@mrfandu1

@mrfandu1 mrfandu1 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

A UTF-8 byte-order marker at the start of a job file prevents the parser from recognizing its front matter. agenticjobs post job.md then asks for an employer even when org: is present. The same marker also hides the first title heading in a plain Markdown job.

Remove the leading encoding marker before normalizing line endings and parsing. The regressions cover plain Markdown and actual CLI post/edit requests from both ordinary files and BOM-prefixed CRLF files, preserving the employer, title, quoted requirements and description.

Validation: the new plain-title case and expanded CLI case both fail against the unmodified source. The fixed TypeScript build and 357 local tests pass on Node 24.18.0. Upstream CI also passes typechecking, all 448 tests with PostgreSQL 17, and the Docker build/startup checks. The database integration cases were exercised in CI; no test database was configured locally.

Implemented and tested with AI assistance.

Copilot AI lite review requested due to automatic review settings September 16, 2026 02:17

Copilot AI 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.

🟢 Approval recommended

The fix is covered by targeted regression tests and no unresolved issues remain.

Pull request overview

Fixes CLI job-file parsing when files begin with a UTF-8 BOM.

Changes:

  • Strip the BOM before parsing.
  • Add Markdown and CLI regression coverage.
File summaries
File Description
test/jobfile.test.ts Adds parser and CLI regression tests.
src/cli/jobfile.ts Removes leading BOMs before parsing.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ralyodio
ralyodio merged commit 8e21d75 into profullstack:master Sep 16, 2026
4 checks passed
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.

3 participants