fix(skills): report a cross-check only when the server actually answered #271

Merged
coilysiren merged 1 commit from coilyco-ops/skills-cross-check-honesty into main 2026-08-13 22:53:57 +00:00 AGit
Member

closes #287 - fetch_history records transport failures rather than raising, so the caller's except branch was unreachable and the flag was set unconditionally

Slice of #269, which stays open on its second criterion: the six specialties against a reachable eco.coilysiren.me:3001 need the live server. This change makes that case report its own cause instead of a clean empty list.

closes #287 - fetch_history records transport failures rather than raising, so the caller's except branch was unreachable and the flag was set unconditionally Slice of #269, which stays open on its second criterion: the six specialties against a reachable eco.coilysiren.me:3001 need the live server. This change makes that case report its own cause instead of a clean empty list.
get_skills(server=...) returned skillsCrossChecked: true and an empty
skillsInUseNotInGraph against a hostname with no DNS record. A
verification that always reports success converts an unanswered question
into a confident all-clear.

The caller looked correct: it wraps fetch_history in
except (httpx.HTTPError, OSError) and sets the flag false. That branch is
unreachable. fetch_history catches per action and records the failure in
history.warnings rather than raising, so an unreachable server arrives as
a well-formed ProgressionHistory with an empty by_specialty, and
annotate_skills_coverage then sets the flag true unconditionally.

per_action_counts is populated only where an exporter answered, and its
own comment says it exists so a reader can tell fetched-but-empty from
errored. The caller now reads it: no entries means nothing was observed
and no cross-check happened.

The distinction that had to survive is that nothing missing is not the
same as nothing checked, so a reachable server with no extra specialties
still reports true with an empty list. A test pins each.

history.warnings are surfaced either way. A partially read server
cross-checks against an incomplete specialty set, and the boolean alone
cannot show that.

Not fixed here: the six specialties missing against a reachable
eco.coilysiren.me. An empty by_specialty on a server that answers points
at auth or the exporter rather than at this flag. This change makes that
case report its own cause instead of a clean empty list.

Mutation: restoring the unconditional annotate fails the unreachable test.

Refs #269, #263

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
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
coilyco-gaming/eco-app!271
No description provided.