Lows: show-working publishes by allowlist and prints Display, edition_year says first appearance

The split guard failed open on any new split name; it now allows Train and
split-less items only. The page printed Debug of Refusal/StoreError and the
EntityRead store message; it prints Display and a fixed line. edition_year
held the first-appearance year of the work or translation, not the page read:
the doc comment and published schema say so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Weksa 2026-11-12 09:46:50 +00:00
commit ff3261a50f
4 changed files with 13 additions and 6 deletions

View file

@ -258,7 +258,7 @@ fn lower_error(e: &LowerError) -> Value {
LowerError::DanglingStress { entity, at } => ("DanglingStress", format!("the ruled pronunciation of {entity} has a stress mark at {at} with no vowel after it")),
LowerError::ConsentMissing { predication } => ("ConsentMissing", format!("{predication} is a request the packet does not carry the addressee's consent to")),
LowerError::AskerNotAddressee { predication } => ("AskerNotAddressee", format!("the agent of {predication} is not the addressee")),
LowerError::EntityRead { entity, why } => ("EntityRead", format!("reading {entity}: {why}")),
LowerError::EntityRead { entity, .. } => ("EntityRead", format!("the entity store failed reading {entity}")),
};
json!({ "variant": variant, "reason": reason })
}
@ -279,11 +279,11 @@ fn run(w: &World, dir: &Path, packet: &Packet) -> Result<(String, Value), Value>
Err(StoreError::Invalid(rs)) => {
return Err(json!({
"kind": "admission_refused",
"refusals": rs.iter().map(|r| json!({ "rule": r.rule(), "detail": format!("{r:?}") })).collect::<Vec<_>>(),
"refusals": rs.iter().map(|r| json!({ "rule": r.rule(), "detail": r.to_string() })).collect::<Vec<_>>(),
}));
}
Err(e) => {
return Err(json!({ "kind": "admission_refused", "refusals": [{ "rule": "store", "detail": format!("{e:?}") }] }));
return Err(json!({ "kind": "admission_refused", "refusals": [{ "rule": "store", "detail": e.to_string() }] }));
}
};
let text = lower(&view, &w.inv, &w.entities).map_err(|e| {