Skip to content

#140 co-core 0.38.0 → 0.51.1; drop the soupsieve override; store_reporting - #149

Open
gregoryfoster wants to merge 12 commits into
mainfrom
140-co-core-0.51.1
Open

gregoryfoster wants to merge 12 commits into
mainfrom
140-co-core-0.51.1

Conversation

@gregoryfoster

@gregoryfoster gregoryfoster commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Refs #140 (the live checks remain after the merge). Plan: docs/plans/2026-11-23-140-co-core-0.51.1.md. Brief: comment 7107994788; corrections: comment 7110222346.

What changes

  • co-core, co-core-aio, co-core-sync 0.38.0 → 0.51.1. processor_version becomes 0.51.1+4. LOCAL_GENERATION stays 4, because this is a co-core bump.
  • Lock advisories: soupsieve 4.1 (extraction child, override past co-core 0.38.0's cap; LOCAL_GENERATION +4) and opentelemetry-api 1.45.2 #138's soupsieve override is removed. co-core 0.51.1 declares soupsieve>=4.1,<5 itself.
    • test_lock_floors: OVERRIDDEN is now empty, and one test holds override-dependencies to exactly its names.
    • The 4.1 floor is co-core's own (CO_CORE_FLOORED), and a test fails if a later co-core lowers it.
  • soupsieve 4.1.1 → 4.1.3 rides along. The lock moves exactly these four packages: still 64 packages, and every co-core source is the co-pypi index.
  • store_reporting (cannobserv#530):
    • The handler stores through the reporting twin.
    • A stored output's outcome record logs output_created. It's a log signal only: GCS is exact on true, the filesystem on false.
    • It isn't named created, which is a LogRecord attribute. The scratch-bus consumer tests failed with KeyError on that name, and a guard test now covers it.
  • The spec is amended 2026-11-23: the header entry, D5, the Dependencies row, the failure table's refusals, Section 4's log fields, the §5 catch-up, the pin test and the quick reference. Also DEPENDENCIES.md, DEPLOYMENT.md § Operate, and AGENTS.md (==0.51.1, no growth).

Bump note

Contract: unchanged, so Watcher gets notice, not coordination.

  • ContentProcessCommand, ProcessingComplete{Emit,Event}, ProcessingFailed{Emit,Event}, ProcessingFailureReason and ContentDerivedEvent are AST-identical between v0.38.0 and v0.51.1, docstrings included.
  • canonical_text, spec_fingerprint, dispatch, media_type, the envelope and co_core_aio.bus are unchanged in code.
  • streams.py changes only in its docstring.

Goldens (scripts/gen_parity_goldens.py, from co-core directly). No existing digest moved; only the new cases were added:

co-core 0.51.1: 7 moved
  feed_atom_include_description: added
  feed_rss_include_description: added
  feed_rss_include_description_false: added
  refused_include_description_not_bool: added
  refused_include_description_on_css: added
  refused_include_description_on_html: added
  refused_include_description_on_non_feed_xml: added

Real corpus: passes unchanged. tests/test_child.py's whole-corpus test passes under required (Landlock ABI 6, locally).

New refusals (cannobserv#559), each a terminal extraction_error. Each one used to extract silently, as if the key were absent:

  • a non-bool include_description;
  • true on any algorithm but full_page;
  • true on an HTML, PDF, CSV/Excel or JSON body;
  • true on a non-feed XML root.

No live spec sets the key, because Archiver's schema refuses it until after this deploy.

soupsieve 4.1.1 → 4.1.3, measured as #138 did:

  • Method: co-core 0.51.1's HtmlExtractor, then canonical_text_fingerprint. Inputs: 311 HTML files (the parity HTML, the 9 real-corpus blobs, every HTML file over 3 KB on co-processor) × 34 selector configs (Lock advisories: soupsieve 4.1 (extraction child, override past co-core 0.38.0's cap; LOCAL_GENERATION +4) and opentelemetry-api 1.45.2 #138's two :has() shapes and the real specs among them), so 10,574 runs per version. The two venvs differ in soupsieve alone, with 30 s per run.
  • Result: 0 of 10,574 runs differ.
  • On both versions: the same 622 strict-:has() refusals (div:has(p a), div:has(div:has(p))), and the same 2 timeouts, both on one 10 MB page (/usr/share/doc/nodejs/api/all.html). Each took 1,161 s.

Tests

  • ruff check, ruff format --check and shellcheck are clean.
  • pytest -m 'not integration': 1054 passed, 10 skipped (environment-only: the service's credentials, docker.sock, SocratiCode local files).
  • pytest -m integration against the scratch Redis: 60 passed.

Review (CR)

# Finding Action
1 Processor's extract tests didn't cover include_description, and refused goldens record only the type Fixed, CR 1: the refused set, each refusal's reason pinned, and a behaviour test
2 The plan named the field created Fixed, CR 2
3 OVERRIDDEN / CO_CORE_FLOORED weren't held to FLOORS, or held apart Fixed, CR 3
4 No separate red commits Declined. Every commit on main stays green; the red runs are in the session (#138's precedent)
5 DEPLOYMENT.md NEAR its budget (447 headroom) Declined. It's under budget, and § Operate is where the outcome fields are looked up
6 The shadowing guard checks the handler's fields, not the consumer's own keys Declined. Those keys are fixed and run in every scratch-bus consumer test, which is how this one was caught

Round 2 (CR --fix; an independent reviewer read the branch alongside):

# Finding Action
7 _admits / _floors read versions as bare numbers. >=4.1rc1 read as floored at 4.1, <=4.1rc1 and ==4.1.* as admitting it, and >=4.1.dev0 raised a bare ValueError Fixed, CR 4: parsed with packaging. A plain release is read exactly (==, ===, ~= included); anything else fails with "read it by hand"
8 _requirement_name didn't normalise (opentelemetry_api ≠ opentelemetry-api), and a nameless entry hit AttributeError Fixed, CR 5: canonicalize_name
9 The spec said an absent or false key "translates byte-identically". The text does, but an explicit false moves spec_fingerprint Fixed, CR 6. The Watcher notice draft now says so too
10 An over-long line in §5 Fixed, CR 7
11 DEPLOYMENT.md's starting field list left out processor_version, which this deploy's live check reads Fixed, CR 8

For #147

docs/DEPENDENCIES.md changed in § Bumping co-core (step 1) and § Extraction dependencies (the "Since #140" entry). Rebase onto those sections.

For #84 (coordinator)

Known limits

🤖 Generated with Claude Code

gregoryfoster and others added 7 commits November 23, 2026 18:29
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Pin co-core, co-core-aio and co-core-sync ==0.51.1, and re-lock with
  --upgrade-package for those three plus soupsieve. Nothing else moved: still 64
  packages, every co-core source still the co-pypi index.
- Remove soupsieve's override-dependencies. co-core >=0.46.1 declares
  soupsieve>=4.1,<5 itself (cannobserv#667). test_lock_floors holds that floor as
  co-core's own (CO_CORE_FLOORED). OVERRIDDEN is empty, and one test holds
  override-dependencies to exactly its names.
- soupsieve 4.1.1 → 4.1.3 rides along (upstream's further quadratic-time fixes).
  LOCAL_GENERATION stays 4, so processor_version = 0.51.1+4.
- Parity: 7 cases for include_description (cannobserv#559). Goldens regenerated
  from co-core. The generator's list is only the added cases, and no existing
  digest moved:

    co-core 0.51.1: 7 moved
      feed_atom_include_description: added
      feed_rss_include_description: added
      feed_rss_include_description_false: added
      refused_include_description_not_bool: added
      refused_include_description_on_css: added
      refused_include_description_on_html: added
      refused_include_description_on_non_feed_xml: added

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
co-core's store_reporting (cannobserv#530, v0.41.0), adopted at this bump as the
epic recorded. The handler stores through the twin and takes .uri for the fact.
A stored output's outcome record logs output_created. It's a log signal, never a
branch: GCS is exact only on True, the filesystem only on False.

The field isn't named `created`: that's a LogRecord attribute, so logging it as
extra raises KeyError. The scratch-bus consumer tests caught that. A handler
test now holds every record field clear of LogRecord's attributes.

FlakyStore's output case injects on store_reporting, and a test holds that the
handler never calls plain store. Spec Section 4 amended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spec's 2026-11-23 entry gains the bump: pin 0.51.1, 0.51.1+4, the
override removed, soupsieve 4.1.3, and include_description with its new
refusals. Changed sections:
- D5 and the Dependencies row;
- the failure table's refusal list;
- §5: the 0.38.0 → 0.51.1 catch-up, and where the override went;
- the pin test, the quick reference heading and its Stores row;
- open question 2's range.

soupsieve 4.1.1 → 4.1.3 on co-core 0.51.1: 311 HTML files × 34 selector
configs, 10,574 runs per version, identical run for run.

DEPENDENCIES.md: step 1 names CO_CORE_FLOORED, plus a "Since #140" entry.
DEPLOYMENT.md § Operate: output_created. AGENTS.md: ==0.51.1, no growth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A refused golden records only the exception type, so each new refusal's reason
is pinned here. Also a behaviour test: true appends the description, and false
gives the plain feed line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OVERRIDDEN and CO_CORE_FLOORED name floors in FLOORS, and never the same one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gregoryfoster and others added 5 commits November 23, 2026 19:25
As numbers, >=4.1rc1 read as floored at 4.1, <=4.1rc1 as admitting it, and
==4.1.* as admitting it; >=4.1.dev0 raised a bare ValueError. _admits (#138) and
_floors now parse each clause with packaging. They read a plain release exactly,
==, === and ~= included, and fail with "read it by hand" on a pre-, dev-, post- or
local version or a wildcard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
opentelemetry_api and opentelemetry-api are one package. An entry with no name
now fails as an invalid requirement, not with AttributeError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Absent or false, the extracted text is byte-identical, but spec_fingerprint
hashes the whole spec. The false golden shows it: same content_fingerprint as
feed_rss, different spec_fingerprint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The record carries it (__main__.py), and a co-core bump's live check reads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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