Skip to content

Bump co-core 0.38.0 → ≥ 0.46.1 and drop the soupsieve override (#138) #140

Open

Description

@gregoryfoster

Why

#138 (PR #139) took soupsieve 4.1.1 for three DoS advisories. It got there with [tool.uv] override-dependencies = ["soupsieve>=4.1,<5"], because co-core 0.38.0's extract extra caps soupsieve <3. An override replaces co-core's requirement outright, so it should be temporary. co-core v0.46.1 and later require soupsieve>=4.1,<5 themselves (CannObserv/cannobserv#667), which makes the override redundant. The latest tag is v0.48.2 (read 2026-11-16).

What

Bump co-core (and co-core-aio, co-core-sync) from 0.38.0 to a release ≥ 0.46.1, following DEPENDENCIES.md § Bumping co-core. Specific to this bump:

  • Remove the soupsieve override. tests/test_lock_floors.py::test_co_core_still_needs_the_override fails once co-core's own requirement admits soupsieve 4.1. Remove the override-dependencies entry and the OVERRIDDEN row, and update the floor tests. Because co-core's own floor is then 4.1, no constraint floor is needed.
  • A catch-up across releases (0.38.0 → 0.4x): read each CHANGELOG's Downstream lines for the extract, bus and blob-store surfaces, and diff those packages between the tags, as Take co-core's XML and feed extractors in step with Watcher, and re-run parity with a feed fixture #29 did. Releases 0.39–0.46 include breaking changes elsewhere in co-core, so check them against what Processor imports.
  • Goldens and corpus: regenerate the parity goldens from co-core directly, and paste every moved digest into the bump note. The real corpus passes unchanged, or the note names what moved.
  • processor_version becomes <new co-core>+<LOCAL_GENERATION>. Watcher gets notice before deploy (on watcher#394 or its successor). It needs coordination instead only if the contract changes.
  • Strict :has() is already live from 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, so it isn't new at this bump. Watcher was told on watcher#394.

Not in scope

  • soupsieve 4.1.2 (unreleased as of 2026-11-16) can ride this bump if co-core's lock or our re-lock picks it up. Otherwise it is its own stack move.

Done when

  • co-core is pinned == at the chosen release (≥ 0.46.1), and the lock has no overrides entry for soupsieve.
  • The goldens are regenerated, with the bump note listing moved digests. The real corpus passes. CI is green by job.
  • Watcher has notice, the deploy is done, and live processor_version reads the new value.

Refs #138, #84.

Activity

  1. gregoryfoster commented on Nov 16, 2026

    @gregoryfoster
    MemberAuthor

    Parked in epic #84 (operator, 2026-11-16). Nothing forces it today: Dependabot shows 0 open alerts, and the audit on main reads 0. tests/test_lock_floors.py::test_co_core_still_needs_the_override makes any co-core bump remove the override.

    Re-entry trigger, whichever comes first:

    At the bump, also adopt CannObserv/cannobserv#530's store_reporting (released in v0.41.0), as the epic's Waits table records.

  2. gregoryfoster commented on Nov 21, 2026

    @gregoryfoster
    MemberAuthor

    A reason to aim this bump at v0.51.0 or later: cannobserv v0.51.0 (tagged and published 2026-11-20) maps the source-spec key include_description (CannObserv/cannobserv#559).

    • What changed. extraction_config_from_spec now maps extraction.include_description: true on full_page specs. On an RSS or Atom body, XmlExtractor then appends each item's description as a fifth tab field.
    • Why the order matters. Archiver's schema will accept the key (Source specs: expose XmlExtractConfig's include_description archiver#353) only after Processor runs v0.51.0 or later. A Processor on an older co-core drops the key without error: it extracts the four-field line and records a fingerprint that doesn't match the spec. That's why the order is cannobserv → Processor → Archiver.
    • New refusals surface as extraction_error (UnsupportedExtractionError is a ValueError):
      • true on a non-full_page spec;
      • true on an HTML, PDF, CSV/Excel or JSON body;
      • true on non-feed XML, an RSS 1.0 rdf:RDF root included.
    • No existing spec changes. Without the key, or with false, every config is byte-identical, so the key itself moves no parity golden. The catch-up from 0.38.0 still crosses the extract changes in between (CannObserv/cannobserv#557, CannObserv/cannobserv#570, CannObserv/cannobserv#354 and others), as the body above says.
    • Target. v0.51.0 satisfies this issue's ≥ 0.46.1, so one bump can cover both the soupsieve override and this.
  3. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Brief: #140, bump co-core 0.38.0 → 0.51.1 (coordinator, epic #84, 2026-11-23)

    Authorities:

    • This issue's body is the spec, as amended by the 2026-11-21 comment, which aims at ≥ 0.51.0.
    • docs/DEPENDENCIES.md § Bumping co-core governs the mechanics.
    • This brief adds a pre-flight against origin/main 75e472f.

    Labels:

    • [measured]: run in this pre-flight;
    • [traced]: read in the code or a diff;
    • [stated]: a changelog or issue says so.

    Why now

    Un-parked 2026-11-23 (operator). The third trigger has fired:

    • CannObserv/cannobserv#559 shipped in co-core v0.51.0 (2026-11-20).
    • Archiver waits on this bump. Source specs: expose XmlExtractConfig's include_description archiver#353 waits on Processor running ≥ 0.51.0. Its schema accepts include_description only after that, in the order cannobserv → Processor → Archiver.
    • An older Processor fails silently. One on co-core < 0.51.0 drops the key without error, so it records a fingerprint that doesn't match the spec.

    That makes #140 Tier 2 under the epic's order rule.

    Target: v0.51.1 [measured: tags, 2026-11-23]

    v0.51.1 (2026-11-22) is the latest tag. Its only additions since v0.51.0 are WordPress deletes and content.fetch credential references, neither of which Processor uses [stated].

    • At build time, re-read the tags.
    • A newer 0.51.x may be taken, if its CHANGELOG touches no surface listed below.
    • A 0.52 stops the thread: ask.
    • co-core-aio and co-core-sync now require co-core>=0.51.1,<0.52 (CannObserv/cannobserv#739), so all three must move together, as they already do here.

    The lock [measured: a scratch copy of pyproject.toml and uv.lock on 75e472f, through scripts/co-pypi.sh]

    uv lock --upgrade-package co-core --upgrade-package co-core-aio --upgrade-package co-core-sync, with the pins at 0.51.1 and the override removed:

    • Moves: only the three, 0.38.0 → 0.51.1.
    • Drops: overrides = [{ name = "soupsieve", … }].
    • Unchanged: still 64 packages, no new package, and no extraction-stack package moved. soupsieve stays at 4.1.1.

    The ride-along. Adding --upgrade-package soupsieve moves soupsieve 4.1.1 → 4.1.3 and nothing else. There's no advisory against 4.1.1; 4.1.2 and 4.1.3 carry upstream's further quadratic-time fixes.

    processor_version becomes 0.51.1+4. At a co-core bump, LOCAL_GENERATION stays (DEPENDENCIES.md § Extraction dependencies, step 2: "update the table, leave the generation").

    The catch-up, 0.38.0 → 0.51.1 [traced: git diff v0.38.0 v0.51.1 over every module Processor imports]

    One correction to the 11-21 comment above. CannObserv/cannobserv#557, CannObserv/cannobserv#570 and CannObserv/cannobserv#354 are not in this range. They are entries under ## [0.38.0] (CHANGELOG lines 630–669), so they are live already.

    Unchanged files:

    • co_core/effects/bus*;
    • pure/adapters/bus/{dead_letter,envelope,exceptions};
    • pure/extract/{canonical,dispatch,media_type,spec_fingerprint,config,base};
    • pure/util/hashing.py;
    • co_core_aio/bus.py.

    streams.py: only its docstring changed.

    No contract change:

    • ContentProcessCommand, ProcessingCompleteEmit, ProcessingFailedEmit and ProcessingFailureReason are unchanged.
    • No schema_version bump touches Processor.
    • The envelope, the stream names and spec_fingerprint/spec_schema_version are unchanged.
    • So Watcher gets notice, not coordination (DEPENDENCIES.md step 4).

    Extraction, across 8 files (+105/−32), all include_description (CannObserv/cannobserv#559):

    • extraction_config_from_spec maps extraction.include_description: true on full_page only, where an absent algorithm counts as full_page. On an RSS or Atom root, XmlExtractor then appends each item's description as a fifth tab field.
    • Absent or false adds no key, so every existing spec translates byte-identically. Expect the goldens to come out unchanged.

    New refusals (UnsupportedExtractionError, so a terminal processing_failed). Each one extracted silently before:

    • a non-bool value;
    • true on css, xpath or jsonpath;
    • true on an HTML, PDF, CSV/Excel or JSON body;
    • true next to an XML xpath;
    • true on a non-feed XML root, RSS 1.0 rdf:RDF included.

    No live spec sets the key, because Archiver's schema refuses it until after this bump [stated]. Neither does the repo: git grep include_description is empty.

    co_core.pure.models.changes gains module-level imports from co_core.pure.util.aliases. That's still inside the package and the Landlock allowlist, but the child's import set grows. The whole-corpus test in tests/test_child.py under required is the check.

    Dependencies (pyproject diffs, all three packages):

    • The Python floor stays >=3.12.
    • The extract extra changes only soupsieve, >=2.0,<3 → >=4.1,<5.
    • aio's bus extra (redis) and sync's gcs extra (google-cloud-storage) are unchanged.

    What the bump touches on main [traced: git grep 0.38.0, outside uv.lock, docs/plans and fixtures]

    Place Change
    pyproject.toml:11-13, tests/test_pin.py:29 (EXPECTED) 0.51.1
    pyproject.toml:131-137 remove the soupsieve override and its comment
    tests/test_lock_floors.py remove the OVERRIDDEN row. Co-core's own floor is 4.1, so no constraint replaces it (DEPENDENCIES.md step 1). Its synthetic-requirement cases (:120-129, :151) are fixtures, not the pin: keep whatever still tests the guard
    tests/test_pin.py EXTRACTION_STACK soupsieve 4.1.3, if it rides along
    tests/test_deploy.py:42,47 read first: a fixture wheel URL and version. Move it only if a test ties it to the pin
    tests/fixtures/parity/cases.json new cases first, so their goldens come from co-core (step 2). Reuse tailscale_security_bulletins.xml and feed.atom with include_description: true. Add refusal cases: on css, on an HTML body, on register.xml (non-feed), and a non-bool
    tests/fixtures/parity/goldens.json regenerate with scripts/gen_parity_goldens.py, and paste its moved/refused list into the bump note. Never real/
    spec (docs/specs/2026-09-29-processor-service-design.md) an Amended 2026-11-2x entry, as #37's at :78. Then D5 :211, the Dependencies row :250, §5 :572ff, the pin test :745, the Contract quick reference heading :818, and :859. The removed override at :562. History stays as written
    docs/DEPENDENCIES.md:157 a "Since #140: 0.51.1+4 …" entry. :152's "(soupsieve <3 in 0.38.0)" stays as an example in the past tense
    AGENTS.md:27 ==0.51.1. AGENTS.md is at 5,945 of 6,000 tokens, so don't grow it

    Operator decisions

    • [Operator decision: target — recommend v0.51.1, or a later 0.51.x per the rule above.]
    • [Operator decision: soupsieve 4.1.3 rides along — recommend yes. It's one extra --upgrade-package, it moves nothing else, and it shares this bump's re-baseline and Watcher notice. Otherwise it's a later generation bump of its own. Measure it like 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: the parity tests, plus the wider HTML corpus over both versions.]
    • [Operator decision: adopt store_reporting (CannObserv/cannobserv#530, v0.41.0), which the epic recorded as "adopt at Bump co-core 0.38.0 → ≥ 0.46.1 and drop the soupsieve override (#138) #140" — recommend yes, as its own commit.
      • The change: src/processor/handler.py:229-234 calls deps.stores.output.store. It would call store_reporting(...), take .uri, and log created in the command-outcome record. That amends spec §4's field list.
      • It's only exact one way per backend: a GCS True is exact, but its False may be an SDK retry of this call's own create; a local False is exact, but its True may be a race. So it's a log signal, never a branch.
      • Declining it: drop the Waits row and close the thread on it.]

    Starting the thread approves these recommendations.

    Order and timing

    Cross-repo, each post approved by the operator in this thread

    Done when

    • The pins: ==0.51.1 (or the chosen 0.51.x) for all three, and the lock has no overrides.
    • The tests:
      • the parity goldens are regenerated from co-core, with the bump note listing what moved (expected: only the new cases);
      • real/ passes unchanged;
      • tests/test_child.py's whole-corpus test passes under required.
    • CI: green by job on the final SHA.
    • Live: Watcher has its notice. Then merge by fast-forward, scripts/deploy.sh, and the live starting record reads processor_version 0.51.1+4, containment required.
    • The PR says Closes #140, unless a live check remains, in which case Refs.

    Out of scope

  4. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Brief check against origin/main 75e472f (implementer, 2026-11-23)

    The target is unchanged: v0.51.1 is still the latest tag. The brief holds, with these corrections. None of them changes the plan or the verdict (notice, not coordination).

    1. More imported modules changed than the brief lists. [traced: git diff v0.38.0 v0.51.1 over every co_core* module src/ and scripts/ import] Besides the 8 extract files and streams.py's docstring, these changed:

    • co_core.pure.util.blobstore, +55: Stored, plus the Protocol's store_reporting / store_file_reporting (#530);
    • co_core_sync.drivers.blobstore.{gcs,local}, +34 / +35: store and store_file now return *_reporting(...).uri. The plain verbs behave identically (same checks, same create or touch, same URI);
    • co_core.pure.models.changes, +371 (see 2);
    • co_core.pure.util.aliases, +119 (credential-reference patterns).

    2. changes.py does more than "gain module-level imports". Its +371 lines touch the fetch, replicate, capture and registry models (render, credential_headers, …). Processor uses five of its classes: ContentProcessCommand, ProcessingCompleteEmit/Event, ProcessingFailedEmit/Event, ProcessingFailureReason. Those (and ContentDerivedEvent) are AST-identical, docstrings included [measured]. And at 0.38.0 changes.py already imported aliases (ReplicationProvider), while aliases still imports only re and typing. So the child loads no new module. tests/test_child.py under required stays the check.

    3. The touch table misses spec :437. That's the failure table's refusal list ("on 0.38.0: …"). It gains the include_description refusals and reads "on 0.51.1".

    4. "true next to an XML xpath" can't be reached from a spec. extraction_config_from_spec refuses a true value on any algorithm but full_page before dispatch, and full_page carries no xpath. XmlExtractor's own check guards direct callers. So the parity cases cover four refusals: css, an HTML body, register.xml (non-feed root) and a non-bool. They don't include an xpath case.

    5. store_reporting commit: tests/test_handler.py's FlakyStore injects by method name. Its method="store" cases must name store_reporting once the handler calls the twin. Otherwise they keep passing but stop injecting the error. The field list that commit amends is Section 4 :529–533.

    6. tests/test_deploy.py:42,47 is a synthetic lock fixture, and no test ties it to the pin. It stays at 0.38.0.

    7. #138's wider-corpus harness wasn't kept. Only its counts are in PR #139. The 4.1.1 → 4.1.3 measurement rebuilds it, with the same input classes (parity HTML, real corpus, host HTML > 3 KB) and its own selector battery. Its counts can't be compared run for run with #138's.

  5. gregoryfoster commented on Nov 23, 2026

    @gregoryfoster
    MemberAuthor

    Post-merge host steps (PR #149, head 4127d5c)

    Live now: 961ab930274e (#143 phase 1). main has moved since (75e472f), but with no runtime path, so this deploy also carries those commits.

    Gates, before step 1:

    1. Merge (fast-forward, from the main checkout /home/exedev/processor, never GitHub's button):

    git fetch origin && git merge --ff-only origin/140-co-core-0.51.1 && git push origin main

    If main moved, merge with a merge commit instead (#7).

    2. Deploy. The merge touches src/, pyproject.toml and uv.lock. Run it in the background: it waits up to 600 s on CI.

    setsid -w scripts/deploy.sh          # from the main checkout, on main == origin/main
    journalctl -t processor-deploy -n 20

    Expect live is on <build>: pid <N> logged starting (child_containment required), then consuming; the smoke run passed.

    3. Verify live:

    cat /srv/processor/live/REVISION                       # the merge's 12-char SHA
    journalctl -u processor -o cat | jq -cR 'fromjson? | select(.message == "starting") | {timestamp, processor_version, build, child_containment, landlock_abi}' | tail -1
    #   → processor_version "0.51.1+4", child_containment "required"
    /srv/processor/live/.venv/bin/python -I -c "from importlib.metadata import version as v; print([v(n) for n in ('co-core','co-core-aio','co-core-sync','soupsieve')])"
    #   → ['0.51.1', '0.51.1', '0.51.1', '4.1.3']
    journalctl -u processor -o cat | jq -cR 'fromjson? | select(.reason == "complete") | {timestamp, command_id, output_created, processor_version}' | tail -3
    #   → once a command completes: output_created true/false, processor_version "0.51.1+4"

    4. Monitors:

    • The next processor-drift.timer run reports ok (journalctl -u processor-drift -n 5).
    • Liveness keeps checking in (processor.liveness records).

    5. Close-out:

    Rollback, if needed: scripts/deploy.sh 961ab930274e (DEPLOYMENT.md § Rollback). That returns to 0.38.0+4, so Watcher re-baselines once more.

  6. added 5 commits that reference this issue on Nov 23, 2026
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

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions