Skip to content

Align peer web citation schema with the stored URL contract #37

Description

@CBEPX

Summary

All three peer output schemas require every webCitations item to be {path, line}, but runtime validation uses only path as an HTTPS URL, ignores line, and stores the normalized citation as a string.

This is not a v1.7.3 blocker: native structured output and runtime validation are working. It is an avoidable contract mismatch that makes Claude emit meaningless data and makes schema readers infer semantics the runtime does not have.

Evidence

  • schemas/peer-design-output.schema.json, peer-research-output.schema.json, and peer-critique-output.schema.json require both path and integer line for web citations.
  • validatePeerMemo() passes only citation.path to directHttps() and returns normalized URL strings (scripts/lib/peer-orchestration.mjs:431-440).
  • Repository citations genuinely validate line numbers; web citations do not.

Desired outcome

Expose one truthful web-citation shape across the native schemas, prompts, validation, stored workflow payloads, rendering, and tests.

Acceptance criteria

  • Remove the meaningless web line requirement or replace it with a field that has enforced semantics.
  • Keep repository {path,line} citations unchanged.
  • Keep direct-HTTPS, hostname, no-userinfo, and credential-query rejection unchanged.
  • Keep existing stored v1.7.x workflows readable, or document an intentional compatibility boundary.
  • Update all design/research/critique schemas and focused contract/E2E tests together.

Provenance

Non-blocking follow-up from the live v1.7.3 Fable design/research qualification.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions