Skip to content

v0.3.2 - Level-88 VALUE clause enhancements + CI improvements

Choose a tag to compare

@EffortlessSteven EffortlessSteven released this 11 Nov 19:34
· 179 commits to main since this release

Highlights

COBOL Compliance: Level-88 VALUE lists now accept comma-separated literals alongside space-separated lists (ANSI COBOL-85 §4.1.2.4.3, IBM Enterprise COBOL).

CI Hardening: Nextest pinned with checksum validation, bench tests isolated from blocking jobs, nightly soaks protected from cancellation, coverage uploads non-blocking, and comprehensive guards prevent future drift.


Why It Matters

For COBOL Users: Unblocks real-world copybooks using commas in VALUE clauses — a common pattern in IBM Enterprise COBOL and compliant with ANSI COBOL-85.

For Contributors: CI remains green with stable gates; wasted compute eliminated through smart concurrency; perf tests isolated in dedicated lanes.

For Maintainers: Comprehensive test coverage (626 tests passing) with zero regressions; automated guards prevent accidental re-introduction of flaky patterns.


Changes

🔧 COBOL Parsing & Tests

Lexer Enhancement

  • Comma token priority elevated above EditedPic to correctly parse Level-88 VALUE lists containing commas
  • Implementation: #[token(",", priority = 4)] Comma outranks EditedPic without breaking genuine edited PIC patterns (e.g., Z,ZZZ.99)
  • Inline documentation explains priority rationale to prevent future regression

Test Coverage (~520 lines, 11 new tests)

  • ✅ Comma-separated lists: VALUE "A", "B", "C"
  • ✅ Mixed separators: VALUE "A", "R" THRU "W"
  • ✅ Comma-inside-string guard: "A,B" does not tokenize comma
  • ✅ Edited PIC preservation: commas inside PIC clauses remain intact
  • ✅ Enterprise scenarios: banking, healthcare, insurance, manufacturing

Documentation Updates

  • Support Matrix documents both space-separated and comma-separated VALUE syntax
  • References ANSI COBOL-85 §4.1.2.4.3 compliance
  • Test evidence: 6 lexer tests + 5 integration tests

🛡️ CI Hardening

Nextest Stability

  • Pinned via taiki-e/install-action@v2 with SHA-256 checksum verification
  • Semver guard ensures explicit version pins (no floating tags)
  • Compatible with nextest v0.9.11+ configuration format

Bench Test Isolation

  • All blocking test commands include --exclude copybook-bench
  • Dedicated perf workflows run with --features perf flag
  • Automated guards validate bench exclusion policy in CI

Concurrency Control

  • Concurrency keys include ${{ github.event_name }} to prevent push events from cancelling scheduled nightly soaks
  • Pattern: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
  • Applied to CI Quick and main CI workflows

Coverage Improvements

  • Codecov upload now non-blocking (avoids false failures on service hiccups)
  • Quick gate script (scripts/ci/quick.sh) aligned with CI exclusion policy
  • POSIX-safe, locale-consistent guard patterns

Compatibility & Migration

No Breaking Changes: Existing space-separated Level-88 lists continue to work; comma syntax is additive.

Local Development

Run perf tests:

cargo test -p copybook-bench --features perf

Reproduce CI quick gates:

cargo nextest run --workspace --exclude copybook-bench --failure-output=immediate

CI Integration

New blocking test steps must include --exclude copybook-bench or automated guards will fail the job.


Technical Notes

Lexer Disambiguation: EditedPic vs. Comma

  • Standalone commas: Tokenized as Token::Comma for Level-88 VALUE lists
  • EditedPic commas: Remain embedded in EditedPic token (e.g., PIC Z,ZZZ.99)
  • String literals: Commas inside quoted strings ("A,B") are not tokenized
  • Priority mechanism: Lexer token priority (4) ensures correct precedence

Test Results

626 tests passing (615 existing + 11 new)

  • Lexer: 11/11 passing
  • Level-88 integration: 10/10 passing
  • Full workspace: zero regressions
  • Clippy pedantic: clean

Pull Requests Included

  • #140 — Harden Test Suite (nextest pin + bench exclusion guards)
  • #141 — nextest config compatibility (v0.9.11+)
  • #142 — CI concurrency isolation + README CI overview + quick.sh alignment
  • #143 — Level-88 VALUE comma support + comprehensive tests
  • #144 — CI Quick concurrency + Support Matrix documentation

Issues Closed: #86 (Level-88 comma support), #122 (CI foundation)


Contributors

Thanks to all contributors who reported issues, reviewed PRs, and helped improve copybook-rs!

Compare: v0.3.1...v0.3.2


Upgrade Instructions

  1. Update dependency:

    [dependencies]
    copybook-core = "0.3.2"
    copybook-codec = "0.3.2"
    copybook-cli = "0.3.2"
  2. No code changes required — this is a fully backward-compatible release.

  3. CI users: If adding new test commands, ensure they include --exclude copybook-bench for blocking jobs.


What's Next

See ROADMAP.md for upcoming features:

  • v0.5.0: Dialect features (COMP-1/2, edited PIC, SIGN directives)
  • v1.0.0: Production stability, comprehensive dialect coverage
  • Ongoing: Performance optimization, benchmark CI integration, Support Matrix CLI

Project Status: Engineering Preview — suitable for teams that validate copybooks against supported features. See docs/REPORT.md for detailed readiness assessment.