Skip to content

Reject malformed card metadata and extend core failure coverage - #414

Merged
zeth merged 6 commits into
mainfrom
test/core-coverage-remaining
Nov 9, 2026
Merged

zeth merged 6 commits into
mainfrom
test/core-coverage-remaining

Conversation

@zeth

@zeth zeth commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Malformed milestone metadata could leave parse_card_file reporting success with partially parsed card identity, links and milestones. Return the original body without parsed metadata when validation fails. Rebuild also now rejects malformed CRLF headers consistently with LF headers, preserving the existing database projection on failure. Both failures were reproduced before the fixes and are covered by regression tests.

Continue the core coverage work from #412:

  • Remove the unused legacy card-link add/remove helpers; retain the target validator used by the daemon.
  • Test nested hierarchy repair, scoped message purges, live/trashed references, timestamp imports, locked-keyring rollback and deterministic external backlink ordering.
  • Exercise C ABI allocation and unexpected-exception handling, unknown input enums and typed storage callback failures.
  • Cover date boundaries, FTS body lookup and symlink-root import rejection.

No new dependencies or coverage exclusions are introduced.

Validation

  • Full local ./make.sh coverage: 835/835 tests passed; HTML and JSON reports generated.
  • Since Fix leaked milestone queries and expand core C API coverage #412: line coverage 97.4% → 98.2% and function coverage 99.2% → 99.4% on GCC/gcov 15.2 and lcov 2.0.
  • Current totals: 14,866/15,135 lines and 1,881/1,892 functions covered. The gains include additional tests and removal of unused code.
  • Malformed-metadata and CRLF rebuild regressions failed before the fixes and pass afterward.
  • Daemon AI-message writer syntax check passed against the reduced link header.
  • Core boundary checker and git diff --check passed.

Contribution Checklist

Licensing

  • I confirm that I have the right to submit this contribution under the project's GPL licence.
  • I agree that this contribution may be distributed under the project's GPL licence.
  • I have read and agree to the terms in CLA.md.

Code Quality

  • I tested these changes locally.
  • I added or updated tests where appropriate.
  • I ran the project's formatting/linting tools where applicable.
  • I kept the change focused and avoided unrelated refactoring.

Security & Dependencies

  • I have not added unnecessary dependencies.
  • Any new dependencies are appropriately licensed and justified (none added).

Documentation

  • I updated relevant documentation where needed (parser contract and regression explanations).

@zeth
zeth merged commit bdff671 into main Nov 9, 2026
70 checks passed
@zeth
zeth deleted the test/core-coverage-remaining branch November 9, 2026 00:44
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