zara-coding: fence symbolic task-state process after protocol integrity failure #163

Closed
opened 2026-09-08 02:03:06 +00:00 by nsaspy · 0 comments
Owner

Problem

TaskStateSession rejects oversized, malformed JSON, malformed-shape and unknown-status responses, but those failures can leave the same owned SWI-Prolog process alive. In particular, readline(MAX_RESPONSE_CHARS + 1) on an oversized line can leave unread tail bytes in stdout; a later request can then consume stale protocol bytes and mis-associate responses with commands.

Required slice

  • deterministic RED proving a protocol-integrity failure terminates/fences the owned process and no later operation reuses or silently replaces it;
  • fence on oversized response, malformed JSON/shape and unknown response status;
  • preserve ordinary canonical ok / rejected responses;
  • explicit stop() remains the deliberate reset boundary;
  • full compatibility, registry/plugin Nix and package gates.

Advances #1 locally without Core #400 composition.

## Problem `TaskStateSession` rejects oversized, malformed JSON, malformed-shape and unknown-status responses, but those failures can leave the same owned SWI-Prolog process alive. In particular, `readline(MAX_RESPONSE_CHARS + 1)` on an oversized line can leave unread tail bytes in stdout; a later request can then consume stale protocol bytes and mis-associate responses with commands. ## Required slice - deterministic RED proving a protocol-integrity failure terminates/fences the owned process and no later operation reuses or silently replaces it; - fence on oversized response, malformed JSON/shape and unknown response status; - preserve ordinary canonical `ok` / `rejected` responses; - explicit `stop()` remains the deliberate reset boundary; - full compatibility, registry/plugin Nix and package gates. Advances #1 locally without Core #400 composition.
Sign in to join this conversation.
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
nsaspy/zara-plugins#163
No description provided.