ENTITY Documentation Portal
Real-world qualification - external engineering

Yomihon #848 - contract-declared status truthfulness

A real external engineering campaign: make reader-visible status wording derive from the canonical vault contract instead of duplicated presentation-layer policy.

Original evidence boundary: At the sealed case-study capture, PR #852 was open and upstream acceptance had not yet occurred. That historical record is unchanged. A later successor event records the subsequent upstream merge. Payment and market value remain unclaimed.
ISSUE -> PRE-CODE ENTITY ANCHOR -> RED TEST -> FIX -> MUTATION PROOF -> UPSTREAM PR -> ENTITY LINEAGE -> DCO -> UPSTREAM ACCEPTANCE

The defect

With no_frontmatter_is_legal = false, the page correctly reported missing frontmatter as a contract violation while the status face still told the reader that no frontmatter was legal.

The engineering change

The page now receives whether the loaded contract requires frontmatter, uses that canonical declaration to choose bilingual status wording, and keeps the existing legal wording only when the contract actually permits missing frontmatter.

Validation

The new page test was observed red against the original behavior, then green after the fix. A deliberate mutation removing the contract-driven branch made the same test red again. Focused Go test, go vet, formatting and diff checks passed; the broader Windows comparison introduced zero new failures versus the exact upstream baseline.

Watch the engineering replay

This is a reproducible replay generated from the sealed command/output record. The transcript and evidence hashes remain authoritative.

Replay video hash record

Recorded terminal replay

YOMIHON #848 - REPRODUCIBLE ENGINEERING REPLAY
Repository: Koopa0/yomihon
Issue: #848
Baseline: dabb04ae74fe969e3a423894ec9f10a86a2fb759
Submitted commit: 6b3698336313966ce09570eeb8270a7976809bad

SCREEN GATE: PASS 100/100
No competing PR or contributor claim at pre-code revalidation.

RED REGRESSION
PS> go test ./internal/note -run TestNoFrontmatterStatusFaceFollowsContract -count=1
--- FAIL: TestNoFrontmatterStatusFaceFollowsContract/required
required/status panel missing "沒有 frontmatter(契約要求必須有)。"
required/seal bar missing "沒有 frontmatter(契約要求必須有)。"
required/status panel missing "No frontmatter (the contract requires one)."
required/seal bar missing "No frontmatter (the contract requires one)."
[exit=1]

FIX
Read the declaration through internal/schema Contract.RequiresFrontmatter().
Carry FrontmatterRequired through the production note handler into NoteView.
Use bilingual wording from internal/wording.
Both reader-visible status faces select wording from the canonical contract declaration.
No judge golden data or status-write semantics changed.

MUTATION PROOF
Temporarily remove the FrontmatterRequired branch from noFrontmatterLine.
PS> go test ./internal/ui/pages -run TestNoFrontmatterStatusFaceFollowsContract -count=1
--- FAIL: TestNoFrontmatterStatusFaceFollowsContract/required
Required wording count became 0 while legal wording was rendered.
MUTATION_TEST_EXIT=1
MUTATION_RESTORED=YES

FINAL FOCUSED GREEN
PS> go test ./internal/ui/pages -run TestNoFrontmatterStatusFaceFollowsContract -count=1
ok github.com/koopa0/yomihon/internal/ui/pages
[exit=0]

STATIC CHECK
PS> go vet ./internal/note ./internal/ui/pages
VET_EXIT=0
PS> git diff --check
DIFFCHECK_EXIT=0

WINDOWS BASELINE COMPARISON
PS> go test -json ./internal/note ./internal/ui/pages -count=1
Untouched upstream failing tests: 66
Patched branch failing tests: 66
New failures on patched branch: 0
Baseline-only failures: 0
The shared failures are pre-existing Windows/platform behavior.

SUBMISSION
Commit: 6b3698336313966ce09570eeb8270a7976809bad
PR: https://github.com/Koopa0/yomihon/pull/852
PR state at evidence capture: OPEN / BLOCKED / no checks scheduled yet
make verify: NOT RUN locally - GNU Make unavailable on this Windows workstation
Full repository CI remains authoritative.

Replay complete. Full terminal transcript, diff, validation summary and hashes are retained in the case-study evidence package.

Open the plain-text command transcript

Upstream acceptance successor

After the original case-study record was sealed, Yomihon maintainer Koopa0 reviewed the contribution, preserved the original BTG-authored commit, added clearly attributable maintainer fixups, and recorded Verdict: PASS. CI completed 12/12 successfully, and PR #852 merged on 2026-10-01.

Original BTG commit6b3698336313966ce09570eeb8270a7976809bad
Final PR headca96bbbc0a0fb459f4f4888baae88731eda9382f
Merge commit034f69015a2ab83ee160debb18fabe6c456c2012
Maintainer verdictPASS
Upstream CI12/12 success
ENTITY acceptance objectobj3-1dfa563132bbb1e04284fa6d02f19a88d6c2b041
Acceptance Global Passportgpassport3-5a271dc4a16efdf3f9ae5afa

This successor event strengthens the external-validation state of the existing BTG-derived asset. It does not create a second replacement-cost asset, assert market value, or claim ownership of the upstream repository.

ENTITY lineage and replacement-cost basis

Campaign anchorobj3-1ce33239d2af2788d4873adc4d100d06e49ec420
Case-study objectobj3-4b64e8c81be5187cdc81ae5eedaad2c29bac1ef6
BTG derived controlobj3-338876fa921366736ab9068cdc131e74b7b6f8db
Derived Global Passportgpassport3-b176d0581925c55e88e6ba15
DCO wrapperobj3-eca0368bf59a7df918bb20ec75f9840707d92f5e
EEP instrumentinst3-bd8812666e08f2894fe03638
Contribution weight10,000 bps / 100%
Management replacement-cost basisCAD $9,795

The CAD $9,795 amount is a BTG management replacement-cost estimate used as an initial lineage basis. It is not fair market value, revenue, a receivable or an independent appraisal. ENTITY keeps later offers, transactions, settlement and realized value as separate evidence.

Sealed evidence

Original submitted BTG head6b3698336313966ce09570eeb8270a7976809bad
Acceptance receipt SHA-25638E39F63648D301C0823F033CDCA793B566FA2C3FD6917A26986E6279534E520
Case-study manifest SHA-256930066047837DE99F19C9FC68218CEABEA74626D7228701EF1BA21212F26AE93
Derived asset receipt SHA-25644B967E0618DAFB2B6BCA894E7FDBDDD909148155D486AA6FD695E4B44998A37
Replacement-cost lineage evidence SHA-256B0958111794A3A8157AFE8B3E2AD0A2C51963A26F4D536258A07A2C2B4AAD49C