Skip to content

test(seams): harden Loomweave/Legis/Filigree seams — contract tests + degraded-state pins (PDR-018)#7

Open
tachyon-beep wants to merge 1 commit into
mainfrom
feat/seam-hardening-blockers-345
Open

test(seams): harden Loomweave/Legis/Filigree seams — contract tests + degraded-state pins (PDR-018)#7
tachyon-beep wants to merge 1 commit into
mainfrom
feat/seam-hardening-blockers-345

Conversation

@tachyon-beep

Copy link
Copy Markdown
Contributor

Seam hardening — production blockers #3/#4/#5 retired plainweave-side (PDR-018)

Retires the last 3 named production blockers. Test-and-docs only — zero src/plainweave/*.py changes: the seam behavior already exists; this freezes and pins it.

A scoping workflow (3 investigators + adversarial challenge per blocker) established the honest size of each: #3 and #4 were behaviorally built and tested already; the genuine gaps were contract-test/parity artifacts and one zero-coverage fact kind. The adversarial pass rejected two unsafe over-scopes (suppressing the Legis *_unavailable warnings — a silent-clean hole; a dedicated Filigree validator module — Filigree emits no .v1 payload).

What landed

  • fix(web): operator UI a11y fixes + peer-facts parity checkpoint (1.2, unreleased) #5 Filigreetests/contracts/test_filigree_contract.py pins open_linked_work as reserved-but-never-emitted (absence is the in-band linked_work_facts_unavailable warning, never empty-but-ok), filigree_issue trace opacity + canonical relations, and the dossier's verdict-free advisory boundary (key + whitelisted-value scan — the dossier legitimately carries lifecycle "approved"/"rejected" values, so the peer-facts scanner doesn't apply).
  • Release 1.2.0 — CLI peer-facts parity + enrichment/doctor fixes #4 Legis — behavioral coverage for orphaned_entity_link (previously zero); ADR-006 annotated with its 8-of-11 emission status (active/waived_finding_linked superseded by the dedicated wardline_peer_facts producer; open_linked_work handed off to Filigree); doc-staleness fix.
  • Member site: plainweave.foundryside.dev (Astro) + Pages deploy #3 Loomweavetests/loomweave_contract.py::validate_loomweave_catalog + a degraded golden, pinning the cardinal no-silent-clean invariant: an unavailable adapter never returns a clean-empty page and never advertises positive coverage/pagination while down.

Verification

  • make ci green: 390 tests (up from 378), 91.18% coverage, mypy --strict + ruff clean.
  • wardline scan clean (0 active).
  • Cross-repo: legis's vendored preflight oracle stays green (28 passed) — additive, no plainweave obligation.
  • Every new test mutation-proven red-first (anti-decorative).
  • Adversarially reviewed across 3 lenses (decorative-test, no-silent-clean/boundary, claim-honesty); all findings applied (notably a strengthened loomweave degraded-state freeze and a value-side dossier scan).

Owner-gated follow-on

docs/handoffs/2026-06-29-filigree-linked-work-facts.md — a peer prompt asking Filigree to emit a local, boundary-clean linked-work facts artifact that Plainweave could adapt in-grant to emit real open_linked_work facts. The live join + gap_create_work write path stay out (would mutate a sibling).

Note: this branch deliberately excludes the concurrent, co-mingled PDR-017 work (the pyproject.toml force-include wheel fix + its PDR/handoff), which remains uncommitted in the working tree for its owner.

🤖 Generated with Claude Code

… degraded-state pins (PDR-018)

Retires the last 3 named production blockers plainweave-side. Test-and-docs only —
zero src/plainweave/*.py changes; the seam BEHAVIOR already exists, this freezes/pins it.

- #5 Filigree: tests/contracts/test_filigree_contract.py pins open_linked_work as
  reserved-but-never-emitted (absence is the in-band linked_work_facts_unavailable
  warning, never empty-but-ok), filigree_issue trace opacity + canonical relations, and
  the dossier's verdict-free advisory boundary (key + whitelisted-value scan — the dossier
  legitimately carries lifecycle "approved"/"rejected" values, so the peer-facts scanner
  doesn't apply).
- #4 Legis: behavioral coverage for orphaned_entity_link (previously zero); ADR-006
  annotated with the 8-of-11 emission status (active/waived_finding_linked superseded by
  the dedicated wardline_peer_facts producer; open_linked_work handed off to Filigree);
  doc-staleness fix (the legis consumer now exists).
- #3 Loomweave: tests/loomweave_contract.py validate_loomweave_catalog + degraded golden,
  pinning the cardinal no-silent-clean invariant — an unavailable adapter never returns a
  clean-empty page and never advertises positive coverage/pagination while down.

Every new test mutation-proven red-first. make ci green (390 tests, 91.18% cov, mypy
--strict + ruff); wardline scan 0 active; legis cross-repo preflight oracle stayed green
(28 passed — additive, no plainweave obligation). Adversarially reviewed (3 lenses:
decorative-test, no-silent-clean/boundary, claim-honesty); all findings applied. Owner-gated
Filigree open_linked_work handoff authored (docs/handoffs/2026-06-29-filigree-linked-work-facts.md).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1086187368

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


from typing import Any

LOOMWEAVE_ADAPTER_STATUSES = {"available", "unavailable"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the degraded adapter status in the catalog contract

When the Loomweave DB exists but lacks the catalog schema or SEI tables, the existing producer returns adapter_status["status"] == "degraded" (covered by tests/test_loomweave_adapter.py:128-160). This new validator rejects that already-supported partial state, so any contract check over live MCP output for a schema-missing or SEI-unsupported catalog fails even though the producer is correctly carrying degradation in-band. Please include degraded in the allowed vocabulary and apply the appropriate no-silent-clean expectations to it.

Useful? React with 👍 / 👎.

"""The real producer over a root with no Loomweave db: an unavailable adapter, an
empty page, and a degraded reason carried in-band (no silent-clean)."""
data = _data(_surface(tmp_path).plainweave_loomweave_catalog_list(limit=50, offset=0))
validate_loomweave_catalog(data)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compare the live degraded envelope to the golden

In the no-Loomweave-DB scenario this only runs the live payload through the structural validator, so the committed catalog-degraded.json can drift from the producer without failing the test; for example, changing the live degraded code/message away from loomweave_db_missing still passes because the validator only requires code/message keys. If this fixture is meant to be a golden pin, load it here and compare live output to it after normalizing path-sensitive fields.

Useful? React with 👍 / 👎.

is reserved vocab the local-only producer never constructs today, so it must never appear
as an empty-but-ok fact list when a future live Filigree join lands (sibling-gated)."""
service = service_for(tmp_path)
requirement_id = approve_requirement(service)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Seed a Filigree trace before guarding open_linked_work

This test claims to pin that the local-only producer never emits open_linked_work, but its setup only creates a requirement and no filigree_issue trace. If a future change incorrectly translates existing local Filigree traces into open_linked_work facts while still leaving the unavailable warning, this contract stays green; add a scoped requirement with a Filigree trace before asserting that the reserved fact is absent.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant