Skip to content

fix: escape inner quotes in issue_holding_statement (precompile fix) - #8

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/crisis-quote-escape
May 14, 2026
Merged

fix: escape inner quotes in issue_holding_statement (precompile fix)#8
hyperpolymath merged 2 commits into
mainfrom
fix/crisis-quote-escape

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

`src/crisis.jl` line 19 reads:

```julia
return "STMT: "$statement""
```

The Julia parser sees this as the literal `"STMT: "` followed by `$statement""`, where `$statement""` is treated as the string macro `@statement_str ""`. No such macro exists, so every consumer that pulls PRComms (TradeUnionist.jl, etc.) fails to precompile with:

```
ERROR: LoadError: UndefVarError: `@statement_str` not defined in `PRComms.Crisis`
```

Properly escape the inner quotes so the original intent (quote the value in the output) is preserved:

```julia
return "STMT: \"$statement\""
```

🤖 Generated with Claude Code

…ment_str)

`return "STMT: "$statement""` is parsed by Julia as three tokens:
the literal "STMT: ", then `$statement""` which the parser
interprets as the string macro `@statement_str ""`. No such macro
exists, so precompile fails with 'UndefVarError: @statement_str not
defined'. Every consumer of PRComms (TradeUnionist.jl#5/#6, etc.) hits
this immediately.

Properly escape the inner quotes so the value gets quoted in the output
as originally intended.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
hyperpolymath enabled auto-merge (squash) May 14, 2026 09:48
…as Dict

After the Crisis precompile fix landed, four pre-existing failure
categories surfaced in PRComms.jl's own CI:

1. `draft_release` requires body ≥ 50 chars (newsroom.jl:42). Five test
   sites were passing 4–29 char placeholders (`"Body"`, `"We launch our
   product."`, `"Body text"`). Replace with substantive ≥50-char copy
   so the validator is exercised by tests that don't intend to trip it.

2. `third_order_ratio(0.8, 0.6, 2.0)` returns 0.10000000000000003 due
   to floating-point subtraction. Replace `==` with `≈` (isapprox).

3. `make_email_signature` was rendering an empty template because
   Mustache.jl 1.x does not accept the view as kwargs to `render`. Pass
   it as a positional `Dict{String,Any}` instead. The four
   `occursin(...)` assertions now match populated HTML.

These are all test-fixture and view-passing fixes; no production
contract changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@hyperpolymath
hyperpolymath merged commit c3a17a8 into main May 14, 2026
18 of 19 checks passed
@hyperpolymath
hyperpolymath deleted the fix/crisis-quote-escape branch May 14, 2026 14:53
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