Skip to content

fix(ci): repair doc-audit workflow YAML and JS escaping#1168

Merged
kcenon merged 1 commit into
developfrom
chore/fix-doc-audit-workflow
Jun 27, 2026
Merged

fix(ci): repair doc-audit workflow YAML and JS escaping#1168
kcenon merged 1 commit into
developfrom
chore/fix-doc-audit-workflow

Conversation

@kcenon

@kcenon kcenon commented Jun 23, 2026

Copy link
Copy Markdown
Owner

What

Fix the Documentation Audit workflow (.github/workflows/doc-audit.yml),
which fails with a startup_failure on every push.

Change type: fix(ci) — workflow file only.

Why

The workflow YAML is unparseable, so GitHub cannot register it and records a
startup_failure (jobs=0) for every push event — a persistent red mark across
all branches since the file was added.

Root cause: in the Comment on PR step's actions/github-script script:
block scalar, the createComment body is a backtick template literal whose
${report} line sits at column 0. That line is less-indented than the block
scalar, so YAML treats it as a new mapping key and fails
(ScannerError: could not find expected ':'). A secondary defect: the two
guard lines use the invalid JS escape \! instead of !.

Where

.github/workflows/doc-audit.yml:

  • Inline the comment body to a single line: `## Documentation Audit Report\n\n${report}` (keeps it inside the block scalar).
  • if (\!fs.existsSync(...)) / if (\!report.trim()) -> ! (valid JS).

How (verification)

yaml.safe_load now parses the file (on: [pull_request], jobs: [audit]).
After merge, push events no longer create startup_failure runs, and the
audit runs as intended on PRs touching docs/**, README*.md, or CLAUDE.md.

This same template defect exists across the kcenon repos; the fix is applied to
each. (The identical file on main should receive the same fix via the next
release-merge.)

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Metric Value
Line Coverage 70.8%
Branch Coverage 35.3%
Target 80% lines / 70% branches
Coverage Details

Full HTML report is available as a build artifact.

kcenon commented Jun 27, 2026

Copy link
Copy Markdown
Owner Author

CI/CD Failure Analysis

Analysis Time: 2026-06-27 10:44:14 UTC
Attempt: #1

Failed Workflows

Workflow Job Step Status
Integration Tests ubuntu-latest - Release Build Failed

Root Cause Analysis

Primary Error:

/usr/bin/ld: liblogger_system.a(rotating_file_writer.cpp.o): undefined reference to `EVP_MAC_fetch`
/usr/bin/ld: liblogger_system.a(rotating_file_writer.cpp.o): undefined reference to `EVP_MAC_CTX_new`
collect2: error: ld returned 1 exit status

Analysis:
The failed link line places libcrypto before liblogger_system.a. On GNU ld, logger_system's OpenSSL EVP_MAC references need libcrypto to appear after the logger archive on the static link line. Current develop already contains the required logger/OpenSSL link-order fix from PR #1167; this branch was tested against the older base and needs to be updated from develop.

Proposed Fix

Issue Proposed Solution Files Affected
Stale branch missing the logger/OpenSSL link-order fix Merge current develop into the PR branch and rerun CI cmake/network_system_integration.cmake, tests/CMakeLists.txt via base update

Next Steps

  • Update PR branch from current develop
  • Verify the targeted build locally where possible
  • Push and monitor CI

Automated failure analysis - Attempt #1

doc-audit.yml failed to register and produced a startup_failure on every push
(jobs=0, "workflow file issue"). The github-script `script:` block scalar was
malformed: the createComment body used a backtick template literal whose
`${report}` line sat at column 0, terminating the block scalar and making the
workflow YAML unparseable (ScannerError). Inline the body as a single
`\n\n`-separated line so it stays within the block scalar indentation.

Also fix the invalid JavaScript escape `\!` -> `!` in the two early-return
guards (`if (\!fs.existsSync(...))`, `if (\!report.trim())`), which would
throw a SyntaxError if the comment step ever executed.

Validated with yaml.safe_load (on: [pull_request], jobs: [audit]).
@kcenon kcenon force-pushed the chore/fix-doc-audit-workflow branch from b64952f to 6c3c3be Compare June 27, 2026 10:49
@kcenon kcenon merged commit 22caf64 into develop Jun 27, 2026
10 checks passed
@kcenon kcenon deleted the chore/fix-doc-audit-workflow branch June 27, 2026 11:36
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