Skip to content

test(api): prove facade writers refuse a daemon-owned archive - #5730

Merged
Sinity merged 4 commits into
masterfrom
claude/facade-writer-authority-test
Sep 28, 2026
Merged

Sinity merged 4 commits into
masterfrom
claude/facade-writer-authority-test

Conversation

@Sinity

@Sinity Sinity commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Integrates orphaned branch w10/s2 and cleans up an inherited red on master. Three separate changes:

  1. Adds a test that the embedded-facade writers refuse an archive whose daemon is resident. Deletes the unused _require_archive_write_authority wrapper in api/archive.py.
  2. The OpenAPI renderer keeps security that an operation documents explicitly, instead of special-casing one route.
  3. Pre-acquisition intake reports a retryable read as a typed RetryableSourceReadError, so the batch no longer adds an except sqlite3 degradation site. The batch.py anchor that fix: Codex review debt: surfaces (51 findings) #5727 admitted is removed from the degradation baseline.

It also adds the missing otel-genai row (tightness 95) to the detector table in docs/atlas/sources-parsers.md.

Problem

Solution

  • tests/unit/operations/test_facade_writer_authority.py holds the daemon's flock on daemon.pid from a separate process, which is the same token polylogued run holds. It then drives the manual-continuation, context-ledger and comparative-judgment writers. Each writer must raise ArchiveWriterOwnershipError naming the PID, and must leave no *.db in the archive root.
  • render_openapi uses operation.setdefault("security", ...). I compared every operation's security before and after, and the rendered document is identical.
  • classify_pre_acquisition converts a retryable OS or SQLite read fault, including one from the readability probe, into RetryableSourceReadError(path, cause). Non-retryable errors propagate unchanged, and a probe failure on bytes that are not a database leaves the exclusion standing. batch.py catches the typed error, and production_baseline.py records it as revision_io_unavailable. New test: test_pre_acquisition_reports_a_retryable_read_as_its_typed_fault.
  • batch.py, batch_support.py and production_baseline.py are in the derived schema closure. No rebuild has started (polylogue-reindex-2026.1 is open).

Verification

  • devtools test tests/unit/sources/test_live_batch_support.py tests/unit/sources/test_production_baseline.py tests/unit/sources/test_cold_build_generation.py tests/unit/operations/test_facade_writer_authority.py tests/unit/devtools/test_render_openapi.py: PASSED exit=0
  • Hosted ci/circleci: quick-gate on the head.

Residuals

  • The facade test covers three of the eight writers. The others need a seeded user.db to reach their check.

🤖 Generated with Claude Code

https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg

@Sinity
Sinity enabled auto-merge (squash) September 28, 2026 17:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T19:45:11.687924Z ea5464f New commits
🔒 Security Review ✅ Completed 2026-09-28T17:25:24.393617Z 9f7f784 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 9f7f784365

ℹ️ 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".

@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: 9699782cb5

ℹ️ 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".

Sinity and others added 4 commits September 28, 2026 21:30
The embedded-facade durable writers moved to operations/facade_writers.py
and check require_archive_write_authority before opening a tier, but no
test drove that refusal, and api/archive.py kept an unused wrapper of the
check. Add a test that runs three writers against an archive whose
pidfile lock is held by another process, and delete the dead wrapper.

The OpenAPI renderer overwrote every declaration's security with the
auth-policy default, which erased the explicit cookie requirement on
DELETE /api/web-auth/session (broken by #5550). #5720 special-cased that
one route; keep any explicitly documented security instead. The
rendered document is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
classify_pre_acquisition now raises RetryableSourceReadError for a read
fault a later pass can clear, instead of letting a raw sqlite3/OS error
escape. The full-ingest batch catches that typed fault, so it no longer
needs a new except-sqlite3 handler or a degradation-baseline admission.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
@Sinity
Sinity force-pushed the claude/facade-writer-authority-test branch from 9699782 to ea5464f Compare September 28, 2026 19:42
@Sinity
Sinity merged commit 837b544 into master Sep 28, 2026
3 checks passed
@Sinity
Sinity deleted the claude/facade-writer-authority-test branch September 28, 2026 19:52
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