Skip to content

chore(release): 1.7.0 - #107

Merged
dknauss merged 3 commits into
mainfrom
claude/keen-tesla-49orwb
Sep 26, 2026
Merged

dknauss merged 3 commits into
mainfrom
claude/keen-tesla-49orwb

Conversation

@dknauss

@dknauss dknauss commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

What changed?

This is the 1.7.0 release prep. It covers everything in [Unreleased]:

  • the full GPL CSL styles and locales (#103);
  • Phase 05 M0–M3: stable IDs, review routes and abilities, and the opt-in citation and block write routes (#104, #106);
  • the save-markup language fix, the mistranslated-string fix, and the reference-manager .bib fixes;
  • the Playground demo page (#102);
  • the runtime matrix on the release package (#105).

Changes in this PR:

  • Formatter speed (commit 0f01fb8). With the full styles, formatting 50 entries took about 90 ms, against about 8 ms in 1.6.0.
    • Cause: citeproc-php's render() calls init() every time, re-reading the locale file and rebuilding the whole style tree. The plugin renders each entry separately (so an "et al." entry can't drop the next entry's "and"), so it paid that cost once per entry.

    • Fix: Bibliography_Builder_Reusable_CiteProc (includes/class-bibliography-builder-reusable-citeproc.php) parses the style once. It records every property of the parsed style tree, and before each later render it:

      • restores those properties;
      • resets the Context's per-render lists;
      • zeroes Layout's static counter.

      Each entry renders exactly as it would after a fresh parse. 50 entries now take about 25 ms.

    • Proof: the nine style goldens still match byte for byte. A new test formats the corpus in reverse order, putting the "et al." and APA 21+ entries first, and requires every entry to match its golden. With the restore disabled, both the goldens and the new test fail.

  • Version strings: the plugin header, block.json, the readme.txt Stable tag, the POT header, package.json, and package-lock.json all move to 1.7.0.
  • CHANGELOG: [Unreleased] is dated 1.7.0 - 2026-09-26, with a line for the formatter speed-up.
  • readme.txt:
    • a user-facing 1.7.0 changelog entry and an Upgrade Notice ("No new external services");
    • the FAQ's REST answer now mentions the opt-in write routes, which are off unless a developer enables the filter.
  • README highlights, STATE, ROADMAP, and metrics move to the 1.7.0 baseline.
  • scripts/package-release.sh now also prunes .git directories from vendor/. In this sandbox Composer couldn't download the dist archive, so it cloned citeproc-php from git instead, and the ZIP picked up 4 MB of git metadata. CI's dist downloads don't hit this, but a release ZIP should never carry .git.

Tested up to stays at 7.1. WordPress latest is 7.1.2 (checked in the current wordpress:php8.3-apache image), and CI's runtime matrix exercises it, including formatter parity across all nine styles on every PHP version.

The readme.txt, README, and metrics ZIP-size figures still quote v1.6.0's release asset. As after 1.6.0, they get updated from the published v1.7.0 asset.

Why? Requested ("cut it", then "fix the formatter first").

Validation

  • npm run lint:js passes
  • npm run lint:css passes
  • npm run lint:i18n passes
  • npm run test passes (873 passed, 2 skipped)
  • npm run build succeeds
  • Release checklist gates:
    • npm audit --omit=dev --omit=optional: 0;
    • composer audit --no-dev: none;
    • composer test:php: 327 OK (the 4 vendor deprecations already on main);
    • composer lint:php, Psalm, and verify-metrics.sh pass;
    • citeproc-php v2.7.1 is current;
    • npm run package:release: a ~550 KB ZIP with no .git, Composer metadata, or package-manager files.
  • Tested in the block editor: the Playground E2E and the runtime matrix ran on Playground demos: open on a demo page covering every input format #102–Phase 05 M3: block settings and reformat write routes #106. The matrix's formatter-parity step now also exercises the reusable formatter on PHP 7.4 through 8.3.

Checklist

  • Linked issue or explained why none was needed: release requested directly.
  • No sensitive details disclosed publicly

After merge, push the tag: git tag v1.7.0 <merge sha> && git push origin v1.7.0. release.yml then builds and publishes the GitHub Release and dispatches wp-deploy.yml.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KbVuMPN7YTcV27vwsG3LZ2

Full GPL CSL styles and locales (#103), Phase 05 M0-M3 (stable IDs,
review routes and abilities, opt-in citation and block write routes:
#104, #106), the save-markup language fix, reference-manager .bib
fixes, the Playground demo page (#102), and the runtime matrix on the
release package with formatter-parity and write-route checks (#105).

Version bumped in the plugin header, block.json, readme.txt Stable tag,
the POT header, and the package manifests. CHANGELOG [Unreleased] is
dated as 1.7.0; readme.txt gains a user-facing changelog entry, an
Upgrade Notice, and an FAQ note on the opt-in write routes. README
highlights and STATE/ROADMAP move to the 1.7.0 baseline.

Tested up to stays 7.1: WordPress latest is 7.1.2, which CI's runtime
matrix exercises, including formatter parity across all nine styles.

package-release.sh now also prunes .git directories from vendor/. When
Composer falls back from dist to a git clone (as it did in this
sandbox), the ZIP otherwise carried 4 MB of git metadata.

Release checklist gates run locally: lint:js, lint:css, lint:i18n,
npm audit (0), composer audit (none), Jest 873 passed / 2 skipped,
PHPUnit 318 OK (the 4 vendor deprecations already on main), build,
package:release (552,718-byte ZIP). citeproc-php v2.7.1 is current.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbVuMPN7YTcV27vwsG3LZ2
@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.18310% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.50%. Comparing base (43ef645) to head (6e35e73).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...s/class-bibliography-builder-reusable-citeproc.php 97.01% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #107      +/-   ##
============================================
+ Coverage     87.39%   87.50%   +0.10%     
- Complexity        0       22      +22     
============================================
  Files            54       55       +1     
  Lines          6021     6089      +68     
  Branches        597      597              
============================================
+ Hits           5262     5328      +66     
- Misses          278      280       +2     
  Partials        481      481              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

CiteProc::render() calls init() every time, which builds a new Context,
reads and parses the locale file, and rebuilds the style's object tree:
about 3 ms, against well under 1 ms to render an entry. With one render
per entry (the fix that stopped an "et al." entry from dropping the
next entry's "and"), 50 entries took about 90 ms, against about 8 ms in
1.6.0 with its short stand-in styles.

Bibliography_Builder_Reusable_CiteProc parses once, records every
property of every object in the parsed style tree, and before each later
render restores them, resets the Context's per-render lists, and zeroes
Layout's static cited-item counter. Each entry renders against the state
a fresh parse would give it: 50 entries now take about 25 ms.

The nine style goldens still match byte for byte. A new test formats the
corpus in reverse order, putting the "et al." and APA 21+ entries ahead
of the short author lists, and requires every entry to match its golden
line; with the restore disabled, both the goldens and the new test fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbVuMPN7YTcV27vwsG3LZ2
@dknauss
dknauss requested a lite review from Copilot September 26, 2026 23:01

dknauss commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review this release PR, and especially commit 0f01fb8. That commit adds includes/class-bibliography-builder-reusable-citeproc.php, which parses each CSL style once and restores citeproc-php's parsed-tree state before each entry. The aim is that no entry's output depends on the entries rendered before it.


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 0f01fb885f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

Copilot review overview

🟡 Changes recommended

Remove or replace #[\Override] to restore compatibility with PHP 7.4.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Prepares the Borges 1.7.0 release and optimizes CSL formatting by reusing parsed citeproc state.

Changes:

  • Adds reusable formatter logic and reverse-order golden coverage.
  • Updates release metadata, changelog, documentation, and planning baselines.
  • Removes vendored .git directories from release packages.

Blocking finding: #[\Override] is incompatible with the declared PHP 7.4 minimum and causes a parse error; it must be removed or replaced.

File Description
tests/​phpunit/​CslStyleGoldenTest.php Adds formatter state-isolation coverage.
scripts/​package-release.sh Prunes vendored Git metadata.
readme.txt Updates release metadata and documentation.
README.md Updates release highlights and metrics.
package.json Bumps the package version.
package-lock.json Synchronizes package versions.
languages/​borges-bibliography-builder.pot Updates translation metadata.
includes/​class-bibliography-builder-reusable-citeproc.php Implements reusable citeproc state restoration.
docs/​current-metrics.md Updates project metrics.
CHANGELOG.md Adds the 1.7.0 release entry.
block.json Bumps the block version.
bibliography-builder.php Bumps plugin metadata and integrates the formatter.
.planning/​STATE.md Updates project release state.
.planning/​ROADMAP.md Updates the release baseline.

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

Comment thread includes/class-bibliography-builder-reusable-citeproc.php Outdated
PHP 7.4 reads an attribute on its own line as a comment (php -l on
7.4 passes, and so does the PHP 7.4 runtime smoke), but Copilot flagged
it as a 7.4 parse error, and compatibility scanners can do the same. It
does nothing at runtime, so drop it, and turn off Psalm's
MissingOverrideAttribute, which cannot apply to a plugin that supports
PHP 7.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbVuMPN7YTcV27vwsG3LZ2
@dknauss
dknauss marked this pull request as ready for review September 26, 2026 23:19
@dknauss
dknauss merged commit 907d2ba into main Sep 26, 2026
16 checks passed
@dknauss
dknauss deleted the claude/keen-tesla-49orwb branch September 26, 2026 23:20
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