Fork card: cap depends at 8 lines of 1000 bytes #73

Merged
libby merged 2 commits from libby/card-depends-caps into main 2026-11-10 17:16:26 +00:00
Member

Closes follow-up cultlib-gaps:follow_up:gov-card-depends-maxitems.

fork-card.schema.json now caps depends at maxItems: 8 and each line at maxLength: 1000 characters; the stored question kind's Line is 1,000 UTF-8 bytes, which a schema cannot count, so the byte limit is a card rule in both judges (C# CardRuleErrors, TS cardRuleErrors) and in fork-card.md.

Vectors (generator scripts/gen-governance-vectors.py, additions only): invalid depends_nine_lines, depends_line_1001_code_points, depends_line_over_1000_bytes (501 x U+00E9, within 1000 characters, 1002 bytes); valid depends_at_both_caps. No existing vector bytes change.

Soul pass (separate agent) held; it found the byte threshold could drift to >1001 unnoticed, fixed by vector depends_line_1001_bytes (killed the mutant in TS; C# 15/15 at the final head). Known: schema maxLength 1000 is redundant with the byte rule and is pinned by no vector; invalid vectors do not record which layer refuses them.

Tested locally only: C# GovernanceVector 15 of 15, TS governance suite 18 of 18 (ajv layer probes by Soul). Negative check: with the old schema the TS suite fails on depends_nine_lines. Not run: rest of the C# project, interop, CI.

🤖 Generated with Claude Code

Closes follow-up `cultlib-gaps:follow_up:gov-card-depends-maxitems`. `fork-card.schema.json` now caps `depends` at `maxItems: 8` and each line at `maxLength: 1000` characters; the stored `question` kind's `Line` is 1,000 UTF-8 bytes, which a schema cannot count, so the byte limit is a card rule in both judges (C# `CardRuleErrors`, TS `cardRuleErrors`) and in `fork-card.md`. Vectors (generator `scripts/gen-governance-vectors.py`, additions only): invalid `depends_nine_lines`, `depends_line_1001_code_points`, `depends_line_over_1000_bytes` (501 x U+00E9, within 1000 characters, 1002 bytes); valid `depends_at_both_caps`. No existing vector bytes change. Soul pass (separate agent) held; it found the byte threshold could drift to >1001 unnoticed, fixed by vector depends_line_1001_bytes (killed the mutant in TS; C# 15/15 at the final head). Known: schema maxLength 1000 is redundant with the byte rule and is pinned by no vector; invalid vectors do not record which layer refuses them. Tested locally only: C# GovernanceVector 15 of 15, TS governance suite 18 of 18 (ajv layer probes by Soul). Negative check: with the old schema the TS suite fails on `depends_nine_lines`. Not run: rest of the C# project, interop, CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fork card: depends capped at 8 lines of 1000 characters, 1000 UTF-8 bytes as a rule
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Has been cancelled
14b33d8a6d
The card schema was looser than the stored question's depends (up to 8 Lines of
at most 1,000 UTF-8 bytes). The schema now bounds count and characters; the byte
limit is a card rule in both judges. Vectors: nine lines and 1001 characters
(schema), 501 two-byte characters (rule), and a card at both caps (valid).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fork card vectors: a depends line one byte over the limit
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 18m3s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 1m14s
6100113430
Kills a byte rule loosened to > 1001, which Soul found surviving.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit 8ca1d18454 into main 2026-11-10 17:16:26 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/CultLib!73
No description provided.