Skip to content

Promote edge to stable: Polis 2.47.0 - #3472

Merged
colinmegill merged 4 commits into
stablefrom
edge
Nov 24, 2026
Merged

colinmegill merged 4 commits into
stablefrom
edge

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Release plan

Version: 2.47.0

Reason: new selected migrations

Previous stable: 61c7180045153b9c6305e56578f7ebbe37ecce6b

Candidate: 65ef57344aaf77bee44cecc7670830541ea75dc3

release.txt additions:

  • 000049_add_topic_map_document_family.sql

Merge the reviewed version preparation into edge, then refresh this plan for the resulting edge SHA before merging the promotion with a merge commit.

colinmegill and others added 4 commits November 23, 2026 13:38
…itched off (migration 000049) (#3465)

* SCHEMA CHANGE (draft, not for merge without a ruling): a Delphi run can store its topic map with its own results, switched off (migration 000049)

What a person observes: nothing. The step is off unless the Delphi job
daemon sets DELPHI_TOPIC_MAP_DOCUMENT=1; with it absent every run, stored
row and log line is what it was, and every topic label a page shows is
unchanged.

Migration 000049 is data-only: one INSERT of the result family
Delphi_TopicMapDocument, keyed (conversation_id S, part S), into
delphi_result_catalog. No table, column, index, constraint, function,
trigger or grant changes. The INSERT takes ROW EXCLUSIVE on
delphi_result_catalog until commit (milliseconds), which conflicts with no
lock any reader or writer of that table takes; nothing on the vote, comment
or next-comment path reads it. lock_timeout is 200 ms. Declared additive in
compat.txt and docs/migrations.md, listed in release.txt, in the forward
proof's additive set, the first-deploy report (regenerated) and the
coordinator's schema census. Reversal: down/000049 refuses while any batch
holds the family.

With the setting on, a full pipeline run ends by handing the codec files of
the three families it has just written (UMAP positions, clusters at every
layer, topic names) to polis-topic-map store, now built into the Delphi
image, and writes the family it returns into the same attempt scratch, so
the daemon stores it in the run's own result batch: the map publishes with
the run or not at all. A map is three rows: the polis-topic-map/1 document
without comment text, its gzip and its SHA-256. A run with nothing to draw,
or whose document would be a row over 1 MiB, stores one no_map row with the
reason. Beside either, an execution row holds the run's own record of its
steps. Every row names the run's job id. Nothing calls a model; nothing is
kept on the box.

- The run's own record of its steps (delphi-run-execution/1). With the
  step on, polismath.step_log keeps in memory one entry per step that ends
  (status, seconds and the step's facts) and per note: UMAP's parameters
  read back from UMAP itself, the clustering (EVoC or its KMeans fallback,
  seed, min_samples), the keyword vectorizer, and per layer the topic
  naming's provider and model and how many names a model wrote and how many
  are fallbacks. Who wrote each name is decided by the naming where it makes
  the name (a model's cleaned response, or a fallback after a missing or
  empty response, or a keyword label), never read from the name's shape;
  the labels returned are unchanged. The record also holds the comment
  selection and its counts, and what the run cannot know: its code version
  and image are in the run record and the deploy. The document's optional
  provenance (serialized last; absent, documents are byte for byte as
  before) names the env, job, run and batch, the publication scope and
  comment rule, the models, the three input families by SHA-256 and row
  count, the execution record, and how the topic names were taken.
- No comment text in names (rule polis-topic-map.names/2). The stored map
  keeps generic names (Topic <n>, with or without its layer_cluster prefix)
  and keyword fallback labels whose every keyword has the vectorizer's
  shape, as their keywords only, never the example comment the fallback
  appends. Every other name, a model's free-form name among them, is shown
  as Topic <n>, because nothing checks a model's name to be free of a
  comment's words. The step and the backfill share the rule.
- polis-topic-map from-run --env --job --out reads a stored run (its record
  and its three families, one read-only snapshot, the daemon's queue login
  and transport rules) and writes the same family file and the document to
  a directory; it never writes to the database, and says whether a stored
  map equals the one it made. A run stored before the step says it has no
  execution record instead of guessing one.
- The family is Postgres-only: it is not in the storage codec's DynamoDB
  catalogue (FAMILIES, its golden files and the server's mirror are as
  before) but in a separate table of Postgres-only result families encoded
  by the same rules. The writer holds and spools it only when written: a
  run's reset neither clears nor emits it, and a map in an earlier batch is
  never copied into a later run's scratch.
- docs: the setting, and the rollback floor. Once a run has stored a map,
  an older Delphi image refuses that conversation's next run in that scope
  and an older API refuses that run's record; turning the setting off does
  not undo it.

Tests: the stored rows, gzip, digest, provenance, the no_map reasons, the
row limit and refusals on the two public fixtures; the name rule's kept and
replaced shapes, including cut labels and a prefixed example; each name's
origin after a missing response, a response that cleans to nothing, a
partly failed batch and the keyword fallback; the step command's bytes; a
PostgreSQL 17 test in which runs admitted, claimed and finalized through
the release's functions store maps under two comment rules in their own
batches and scopes, and from-run writes the step's bytes for each, and for
a run stored with the step off; the recorder off and on; the Python step on
a real attempt writer, off and on; the family's key against its catalog
row; the Compose default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Stored topic map: model-written names kept; a failed draw no longer fails the run (setting off: no change)

With DELPHI_TOPIC_MAP_DOCUMENT off (the default) nothing a person sees
changes: every run, stored row and log line is what it was. With it on:

- A topic name the naming recorded as written by the model is stored in
  the map as the model wrote it. The stored-name rule is now
  polis-topic-map.names/3, and the provenance counts these names as
  written_by_model. The origin reaches the generator through the run's
  execution record: each layer's topic_names entry now lists the clusters
  whose names the model wrote (model_clusters, ids only). A name of a
  fallback or of no recorded origin (a run stored before the step) is
  taken as before: generic names and the keyword fallback's keywords are
  kept, everything else is shown as "Topic <n>". A name's shape or prefix
  is never read as its origin.
- When the generator fails (not installed, did not run, timed out,
  refused the run's families, or wrote something else), the run no longer
  fails. Its other results publish, an error is logged, and the map's
  family holds one no_map row with reason generator_failed and a closed
  failure label; the generator's message is never stored. A writer that
  cannot hold the map (another conversation's frame, no result scope)
  still fails the run.

Nothing new runs with the setting off: the note is made only while the
run records its steps. No handler, pool, lock or migration is added; the
change runs inside the existing Delphi child, keeps nothing on the box
(the failure is a row with the run's results and a log line), calls no
model and reads or writes no vote.

Tests: a Rust test that recorded model names are kept and unrecorded
ones are not; Python tests for each failure label, for the one row and
the other families publishing, and for names kept from the recorded
origin; a naming test for the origin facts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Stored topic map: a generator whose output is not a whole map, or whose diagnostics are not UTF-8, no longer fails the run (setting off: no change)

With DELPHI_TOPIC_MAP_DOCUMENT unset (the default) nothing changes.

With it on, two generator faults that still escaped the failed-draw handling
now end the same way as every other failed draw: the run's other results
publish, the map's family holds one no_map row with reason generator_failed,
and one error line is logged.

- Diagnostics that are not valid UTF-8: the generator's output is captured as
  bytes and its stderr is decoded with replacement for the log only, so a
  stray byte is a refusal ("refused"), never a decode error that fails the run.
- A family the codec reads but that is not a whole map (a map without its
  document or gzip row or byte counts, a no_map row without a reason): the
  parts and attributes the step reports are now read inside the failed-draw
  handling, before anything is stored, and such a family is "wrong_output".
  An incomplete family is never put.

Writer faults (another conversation's frame, no result scope) still fail the
run, as before. No row holds stderr or comment text. Tests: the failed-draw
test gains a generator that writes invalid bytes to stdout and stderr, and two
that write a canonical but incomplete family.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…itched off and selected by nothing (#3468)

* topic map: the generator crate joins the queue-rs workspace, with its datamapplot parity tests and two public fixtures

queue-rs/polis-topic-map is the generation-time half of a first-party topic
map: from a Delphi run's stored UMAP positions, cluster layers and topic
names it computes everything about the map that depends only on the run
(the standard size, the first view, the point radius, each topic's label
anchor and weight, its parent one level up, and both datamapplot palettes)
and writes it as one JSON document, polis-topic-map/1. A library (build)
and a command (polis-topic-map data | page). Nothing calls it yet: no
route, no pipeline stage, no stored data.

The source is the prototype's, formatted by rustfmt, with lint allowances
on six lines (three index loops over parallel arrays, two unwraps on values
that cannot be empty, one expect on the crate's constant colour table) so
the crate can deny unwrap and expect as the other workspace members do.
serde_json is asked for float_roundtrip, so numbers are read the same way
whichever crate it is built with (polis-api turns it on for a whole
workspace build).

Tests: tests/datamapplot_parity.rs (the port against the values
datamapplot 0.6.4 and colorspacious computed for the same runs) and
tests/document_recording.rs (the whole document's length and SHA-256 for
each fixture, from the library and from the command; the recorded values
are what the prototype wrote for the same inputs).

The public fixtures are a Delphi run over two compdemocracy/openData
conversations (CC BY 4.0), bg2050-volunteers and
scoop-hivemind.biodiversity: comment ids, positions, clusters, topic names
and datamapplot's own values, 1,759,374 bytes in six files, no comment text
and no vote. NOTICE carries datamapplot's MIT licence, the CET-C2s colour
map's CC BY 4.0 attribution and the fixtures'.

No new external package: Cargo.lock gains only the crate's own entry
(serde, serde_json and, for the tests, sha2 are already locked).

Co-Authored-By: Claude <noreply@anthropic.com>

* ci: make check-polis-topic-map runs the topic map generator's formatting, clippy and tests, and hosted CI calls it

ci/local/polis-topic-map.sh runs, in queue-rs, cargo fmt --check, cargo
clippy --all-targets -D warnings and cargo test for polis-topic-map, the
same three steps the other single-crate entry points run for theirs. It
needs the pinned toolchain and nothing else: no database, no Docker, no
network beyond fetching the locked crates.

make check-polis-topic-map calls it, docs/local-checks.md lists it, and
the queue-rs workflow has a new job, polis-topic-map, whose only step is
that make target. The workflow's path filters already cover every file the
check reads (queue-rs/**, ci/local/**, Makefile).

Co-Authored-By: Claude <noreply@anthropic.com>

* contracts: the report topic map's request, its answers and its closed set of refusals as types

GET /api/v3/delphi/topicMap?report_id=<id>[&job_id=<id>] answers one of:
the document polis-topic-map/1 (TopicMap, closed, field for field as the
generator writes it, with an empty points.text, title and attribution); a
200 without a map whose reason is one of no_run, run_not_ready,
no_positions, no_topics or too_few_comments; or a refusal: 400 without a
report id, 404 for a report without a conversation, 404 Job not found, and
422 polis_err_topic_map_too_large. The refusal bodies keep the shapes of the
report's other Delphi reads.

Types only; nothing serves them yet.

Co-Authored-By: Claude <noreply@anthropic.com>

* polis-api: a report's topic map as a typed read route, computed from its run's stored families, switched off

GET and HEAD /api/v3/delphi/topicMap?report_id=<id>[&job_id=<id>] answer
the document polis-topic-map/1 for the run the report's conversation
serves, or for the named run when it is that conversation's. A Rust-only
route behind POLIS_API_DELPHI_TOPIC_MAP_READS, off by default; its pool is
built only when the switch is on.

The map is computed when first asked, with the generator crate, from three
families the run already stores in the PostgreSQL result store: the node
rows of Delphi_UMAPGraph, Delphi_CommentHierarchicalClusterAssignments and
Delphi_CommentClustersLLMTopicNames, each read where its batch lives
(pd_run_record, pd_result_artifact_wire), never through the publication
pointer. It is kept in memory by job id, within 32 MiB and 256 runs. No
comment text; nothing stored; no schema change.

Visibility is that of the report's other Delphi reads, which Node registers
without sign-in. A report with nothing to draw (no served run, a run not
finished, no positions, no topics, or a first view with no area, as with
one or two comments) answers 200 with its reason; a run over the bounds
(20,000 comments, 32 MiB a family, an 8 MiB document) is refused with 422,
never truncated.

The participation path shares nothing with it: its own two-slot read-only
pool (50 ms to acquire, 2 s statements, 4 s a request); every read returns
its connection before the map is computed; the computation runs on a
blocking thread, one at a time in the process. A test floods the route with
its pool stuck and a computation in flight while a vote is written and the
next comment, the comments and the votes are read: none waits for a slot.

The stored assignments are decoded by the typed assignments read's own
rules, now a function both routes call.

Co-Authored-By: Claude <noreply@anthropic.com>

* nginx: the selector delphiTopicMap for the report topic map, selected by nothing

Its location template sends GET and HEAD of /api/v3/delphi/topicMap without
a body to polis-api, with a 5 s read timeout (the route answers or hands
back within 4 s), and everything else to Node, whose answer for this path
is 404. The renderer knows the name; no selection names it. The routing
test checks it off, unselected beside the other Delphi reads, on and
deduplicated, its rendered location equal to its template, the methods and
bodies that stay on Node, and a hand-back reaching Node's 404. The
render-unchanged check now names delphiTopicMap as the one new name, and
the CLI differential's routing census lists it as Rust-only with no CLI
command.

Co-Authored-By: Claude <noreply@anthropic.com>

* polis-api: the report topic map's admission, off-runtime preparation and size refusals, as left before the route became a read of stored bytes

One request at a time reads a run that is not in memory, others are told
to retry (503, Retry-After); the ETag and compressed forms are prepared on
the route's own thread; size bounds answer 422. Kept as a step in the
branch's history: the next commits replace the computation with a read of
the stored map document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* polis-api: the report topic map is a read of the map a run stored, by run, switched off

The route no longer computes a map. A run that makes one stores the
document, its gzip and its SHA-256 as the parts of the result family
Delphi_TopicMapDocument in its own batch; the route finds the run, reads
the one part the client needs and sends those bytes as they are, with the
stored digest as the ETag. Nothing is hashed, compressed or parsed here,
and the generator is no longer a dependency of polis-api.

Which run: the served run of the conversation in the publication scope of
the comment rule asked for (what participants are shown by default; the
scope is always named), the shadow's served run (source=shadow), or one
stored run (job_id). The map is read from the run's own batch only and
every row must name the run's job, so an earlier run's map is never served
as a later one's. The answer's headers name the job, source, scope and
comment rule.

Who: the served map under the participants' rule is as public as the
report's other Delphi reads; a named run and the other rules need a
moderator of the conversation or a site administrator; the shadow, a site
administrator. A stored run being public is one constant, off.

The participation path shares nothing with it: four places in the process
taken before any read (503 with Retry-After when none is free, when its
own pool has no connection, or at its 3 s deadline), its own two pools,
each stored part bounded in the statement before it is sent, nothing kept
between requests, and nginx buffering the answer in memory. A load test
samples the next comment, the comments and the votes reads with the route
idle and saturated.

Both switches stay off. No schema change. No Node change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* polis-api: the topic map load test compares its reads' own deadline misses with the control's

A read on a busy machine can miss its own short deadline and go back to
Node with its own evidence; the saturated route may not add such misses
beyond the control's by more than two of forty. Every read must still
take its own pool with no wait for a slot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* polis-api: the report topic map checks each stored map, keeps its place until the answer is written, sheds slow reads, and serves past runs publicly

- A stored family is checked once per process before any of it is sent,
  off the runtime's threads and after its connection has gone back: the
  document's SHA-256 must be the stored digest and the gzip must inflate
  to exactly the document. Only the verdict is kept. A family that fails
  is refused (500, polis_err_topic_map_unreadable), as is any row naming
  another job, whatever If-None-Match says: the producer and digest checks
  no longer depend on the client's ETag.
- A request's admission place and byte count now last until its answer
  has been written or its connection dropped, with a 5 s write bound for
  such answers (http::hold_until_written). A test holds answers open on
  the real HTTP server and samples the votes-path reads meanwhile.
- A statement or lock timeout, a failed connection and an identity lookup
  the database does not answer are 503 with Retry-After, never a hand-back
  to Node's 404 and never 401.
- A past run named by job id is as public as the current map when it was
  made under the participants' rule; a run of another rule stays its
  moderators', the shadow its site administrators'. A past run whose map
  has been removed answers not_stored, as one that never stored a map.

Adds miniz_oxide (pure Rust inflate). Both switches stay off. No schema
change. No Node change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* polis-api: the report topic map's stored-map check keeps its bounds until its work ends, and accepts only a whole, valid gzip

Two corrections to the stored-map check, with the route still switched off.

A check given up at the route's deadline no longer frees its bounds early.
The blocking check now owns the checker's permit, the count of the bytes
it reads and a clone of the request's place, and hands them back with its
result, as the database work already does with its pool permit. A request
whose future is dropped while its check is queued or running frees none of
the three until the detached check, and the bytes it holds, are gone; with
the other places taken a fifth request is shed until then.

The stored gzip is certified only when a conforming decoder would accept
it: no reserved flag bit, the header CRC when present, a DEFLATE stream
that ends exactly at the trailer (one member, nothing after it), and a
trailer whose CRC-32 and length are the data's. The decompressed-size cap
and the blocking-thread isolation are unchanged. An invalid gzip refuses
the map for both encodings and every conditional request.

Tests: a unit test of the gzip framing (wrong trailer CRC and length,
reserved flags, right and wrong header CRC, an extra field past the end, a
byte, a second member or bytes between the stream and its trailer); two
runtime tests with the one blocking thread taken (a queued check keeps its
bounds; a given-up check keeps them until it has run); and four database
fixtures (wrong trailer CRC, reserved flag, a trailing byte, wrong header
CRC) answering 500 unreadable for gzip and identity with no tag, a stale
tag, the stored tag and *.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* polis-api: the held topic map answers test holds its answers on Linux too

The test serves stored map answers to clients that read nothing and checks
that each answer keeps its place and its byte count until it is written.
On Linux an accepted loopback socket starts with a send buffer of about
2.6 MB, larger than the test's document, so the kernel took each whole
answer at once, the write completed and let go of its place (as a
completed write should), and the test found nothing held. On macOS the
smaller send buffer kept the answers held, which is why it passed there.

The test now sets a 4096-byte send buffer on the listening socket it
starts; accepted connections inherit it, so an answer to a client that
does not read stays on its way. A new assertion checks that the server's
send buffer is far smaller than the document. Every other assertion is
unchanged; the route is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1

* polis-api: the topic map saturation test samples each phase across at least two seconds

The loaded phase of the saturation test took forty rounds of the three
participation reads, about 0.3 s in a release build: three periods of the
kernel's CPU quota at half a CPU. A pass said little about a sustained flood.

Each phase now takes at least forty rounds and lasts at least two seconds
(twenty quota periods); the loaded phase takes at least as many rounds as
the idle control, under the same flood. Every assertion and limit is kept:
isolation for every sample, the 95th percentile within twice the control's
plus 25 ms, and the miss rule restated as the same proportion over all the
samples taken (the loaded share of misses may exceed the control's by at
most two in forty; with forty samples each this is the old "control + 2").
The report prints each phase's rounds and duration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1

* polis-api: the topic map saturation test can run its server and its clients in separate processes

The saturation test samples the participation reads while sixteen clients
flood the topic map, all in one process. Under a CPU quota the flooding
clients and the samplers then spend the server's quota too, which is not
how the service runs (its clients are outside, through the proxy).

Two environment variables split it. POLIS_API_SATURATION_SERVE=<ip:port>
seeds the same fixture, builds the same app and serves it over HTTP, with a
control listener on the next port that reports the participation pools'
evidence and the cgroup's cpu.stat at each phase boundary.
POLIS_API_SATURATION_TARGET=<host:port> runs the same warm-up, control
phase, sixteen-client flood and loaded phase over HTTP/1.1 keep-alive, and
applies the same rules: no wait for a slot of a read's own pool, every
acquired operation finished, a 502 only with its own failure (checked on
the server's evidence across each phase), the same miss share and the same
95th percentile bound. POLIS_API_SATURATION_FLOOD floods another route and
POLIS_API_SATURATION_RATE paces the flood. With neither of the first two
set the test runs in one process exactly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1

* nginx: the topic map route's requests to polis-api are bounded at 200 a second

With delphiTopicMap selected, its location gets a limit_req with one zone
for the whole location on the box (a constant key: behind the load balancer
every client arrives from a few addresses), 200 requests a second, burst
200, nodelay. A request over the bound is answered by nginx itself and is
never passed to polis-api or handed to Node: 503 with Retry-After: 1,
Cache-Control: no-store and the JSON body the route sheds with
({"status":"error","message":"polis_err_topic_map_busy"}). Shedding inside
polis-api still costs polis-api's CPU; shedding here costs it nothing.

The location already intercepts polis-api's errors and hands 502 and 504 to
Node, and passes polis-api's own 503 through. To answer nginx's refusal with
that body without touching polis-api's 503, the refusal uses 429 as an
internal hand-over (never sent; the route never answers 429) to a named
location that returns the 503. Refusals are logged at info, out of the error
log. A request already handed to Node (not GET or HEAD, or with a body) is
not counted. The zone is rendered only when the route is selected; nothing
else renders differently.

test-shadow-mirror.py topic-map-rate, run by nginx-shadow.sh after the
upstream test: a burst of 1,200 map requests and 300 to other locations
(pca2 at polis-api, an API path and the next comment at Node) is answered
partly by polis-api and the rest by nginx's 503; polis-api receives at most
the bound over the burst, Node none; the other requests are all answered
and received once; after the bucket drains a map request reaches polis-api.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1

* polis-api: the split saturation client counts a failed read as a miss and checks each read's own evidence

In the two-process form of the topic map saturation test, a participation
read whose attempt failed was retried on a new connection and timed from
the retry, so the failed attempt's time and its miss left no trace. A
failed attempt is now the sample: a miss, timed from its first byte, never
retried or replaced. Failed attempts and reconnects are counted and printed
per read and per phase.

The client's isolation checks were phase totals, which cannot show that
every read used its own pool or had its own failure evidence. The server
now records each read's pool evidence at its arrival, and after each sample
the client asks for that read's evidence alone (how many requests reached
the server and the pool counters across them once their work finished).
The original per-request obligations are applied to every sample, each
sample must reach the server once, and the phase totals are kept as well.

A new test shows a first attempt that reaches the server, takes 100 ms and
is closed unanswered recorded as a miss with its 100 ms.

The in-process form of the test is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1

---------

Co-authored-by: Claude <noreply@anthropic.com>
…dependent count (#3470)

* polis-api: the warm topic map flood test asserts what the route guarantees

The test sent 64 requests at once for a stored map and asserted that at
least four were answered 200, one per place. The route does not guarantee
that: it has four places but two read connections with a 50 ms acquire
timeout, so on a slow machine a request that holds a place is shed at its
pool while two others read. A hosted runner answered three.

The test now asserts that at least one is answered (a request is shed at
the pool only while others hold its connections, and the last of those is
never shed there), that every answer is still the whole stored document or
gzip member or the route's own 503, and, in place of the count, that the
flood gives back every place and byte and the route then answers a single
request with the whole stored document within its deadline. The bounds on
places and held bytes are unchanged, and so is every participation
assertion.

The held-answers test had the same dependence: twelve clients arrived at
once, and one of the four admitted could be shed at the pool, leaving fewer
than eight shed at the door. The four that are answered now arrive one at a
time, each once the one before holds its answer; its assertions are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1

* polis-api: the warm topic map test says its one-answer check is a liveness check of a healthy fixture

A request that holds a connection can still fail a statement or the route's
deadline, so the route does not guarantee an answered map on every machine.
The assertion stays; its message and comment now say what it is.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KvftUARCjBArGpuPBmjRZ1

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@colinmegill
colinmegill marked this pull request as ready for review November 24, 2026 01:46
@colinmegill
colinmegill merged commit 4039294 into stable Nov 24, 2026
100 checks passed
@github-actions

Copy link
Copy Markdown
Contributor Author

Delphi Coverage Report

File Stmts Miss Cover
polismath/init.py 2 0 100%
polismath/benchmarks/bench_pca.py 128 107 16%
polismath/benchmarks/bench_repness.py 81 65 20%
polismath/benchmarks/bench_update_votes.py 38 28 26%
polismath/benchmarks/benchmark_utils.py 34 0 100%
polismath/components/init.py 1 0 100%
polismath/components/config.py 165 70 58%
polismath/conversation/init.py 2 0 100%
polismath/conversation/conversation.py 1293 264 80%
polismath/conversation/group_vote_counts.py 38 2 95%
polismath/conversation/manager.py 131 42 68%
polismath/database/init.py 1 0 100%
polismath/database/dynamodb.py 392 176 55%
polismath/database/postgres.py 414 95 77%
polismath/delphi_storage/init.py 1 0 100%
polismath/delphi_storage/codec.py 300 22 93%
polismath/delphi_storage/embedding_spool.py 58 6 90%
polismath/delphi_storage/golden_corpus.py 60 9 85%
polismath/delphi_storage/import_report.py 51 3 94%
polismath/delphi_storage/legacy_import.py 171 16 91%
polismath/delphi_storage/postgres.py 51 22 57%
polismath/delphi_storage/production_import.py 614 131 79%
polismath/delphi_storage/resource.py 179 32 82%
polismath/delphi_storage/scan_pacing.py 77 0 100%
polismath/delphi_storage/topic_map.py 128 7 95%
polismath/delphi_storage/writer.py 200 13 94%
polismath/embedding_model.py 197 49 75%
polismath/empty_output.py 29 2 93%
polismath/engine_adapter.py 317 265 16%
polismath/job_child/init.py 372 52 86%
polismath/job_child/census.py 74 9 88%
polismath/job_child/input_bundle.py 106 7 93%
polismath/pca_kmeans_rep/init.py 5 0 100%
polismath/pca_kmeans_rep/clusters.py 257 38 85%
polismath/pca_kmeans_rep/corr.py 98 17 83%
polismath/pca_kmeans_rep/group_k_smoother.py 28 0 100%
polismath/pca_kmeans_rep/legacy_kmeans.py 197 8 96%
polismath/pca_kmeans_rep/pca.py 162 19 88%
polismath/pca_kmeans_rep/repness.py 226 5 98%
polismath/poller/init.py 4 0 100%
polismath/poller/admission.py 318 15 95%
polismath/poller/backfill.py 936 32 97%
polismath/poller/capacity.py 485 27 94%
polismath/poller/capacity_queue.py 248 13 95%
polismath/poller/coordinator_bridge.py 317 317 0%
polismath/poller/math_writer.py 120 3 98%
polismath/poller/promotion.py 112 4 96%
polismath/poller/readiness.py 368 13 96%
polismath/poller/rebuild_child.py 133 5 96%
polismath/poller/recompute_line.py 141 9 94%
polismath/poller/service.py 760 50 93%
polismath/poller/worker_pool.py 143 0 100%
polismath/queue/executor.py 221 111 50%
polismath/regression/init.py 4 0 100%
polismath/regression/clojure_comparer.py 188 20 89%
polismath/regression/comparer.py 891 640 28%
polismath/regression/datasets.py 126 27 79%
polismath/regression/recorder.py 36 27 25%
polismath/regression/utils.py 130 85 35%
polismath/replay/init.py 2 0 100%
polismath/replay/attribution_capture.py 49 0 100%
polismath/replay/axis_continuity.py 347 24 93%
polismath/replay/certify.py 999 59 94%
polismath/replay/crosslang.py 128 2 98%
polismath/replay/decision_ties.py 51 8 84%
polismath/replay/diagnostics.py 50 7 86%
polismath/replay/driver.py 73 1 99%
polismath/replay/dsn_admission.py 36 1 97%
polismath/replay/equiv_query.py 10 0 100%
polismath/replay/event_ingress.py 95 1 99%
polismath/replay/fixture_bundle.py 815 62 92%
polismath/replay/fixture_config.py 266 11 96%
polismath/replay/fixture_extract.py 285 12 96%
polismath/replay/fixture_generate.py 103 1 99%
polismath/replay/fixture_samples.py 157 14 91%
polismath/replay/fixture_selection.py 119 0 100%
polismath/replay/fixture_survey.py 147 11 93%
polismath/replay/legacy_pca.py 29 17 41%
polismath/replay/polarity.py 319 25 92%
polismath/replay/poller_equiv.py 776 99 87%
polismath/replay/prodclone.py 193 2 99%
polismath/replay/real_data.py 146 10 93%
polismath/replay/schedule.py 205 10 95%
polismath/replay/served_math.py 159 4 97%
polismath/replay/shard_bench.py 189 65 66%
polismath/replay/stagecompare.py 890 161 82%
polismath/replay/stages.py 256 40 84%
polismath/replay/stepcompare.py 86 1 99%
polismath/replay/store.py 120 11 91%
polismath/replay/tie_capture.py 107 19 82%
polismath/replay/types.py 58 6 90%
polismath/run_math_pipeline.py 284 93 67%
polismath/selection.py 58 0 100%
polismath/step_log.py 127 15 88%
polismath/tools/engine_rebuild.py 230 11 95%
polismath/types.py 6 0 100%
polismath/utils/cli_flags.py 15 0 100%
polismath/utils/clj_hash.py 44 0 100%
polismath/utils/env_flags.py 13 0 100%
polismath/utils/general.py 63 39 38%
polismath/utils/output_profile.py 66 2 97%
polismath/utils/serialization.py 10 5 50%
polismath/utils/vote_convention.py 159 5 97%
umap_narrative/700_datamapplot_for_layer.py 514 470 9%
umap_narrative/701_static_datamapplot_for_layer.py 310 310 0%
umap_narrative/702_consensus_divisive_datamapplot.py 435 275 37%
umap_narrative/801_narrative_report_batch.py 657 209 68%
umap_narrative/803_check_batch_status.py 268 148 45%
umap_narrative/llm_factory_constructor/init.py 2 0 100%
umap_narrative/llm_factory_constructor/model_provider.py 232 106 54%
umap_narrative/narrative_data.py 178 55 69%
umap_narrative/numerical_stages.py 111 21 81%
umap_narrative/polismath_commentgraph/init.py 1 0 100%
umap_narrative/polismath_commentgraph/cli.py 268 268 0%
umap_narrative/polismath_commentgraph/core/init.py 3 3 0%
umap_narrative/polismath_commentgraph/core/clustering.py 108 108 0%
umap_narrative/polismath_commentgraph/core/embedding.py 104 104 0%
umap_narrative/polismath_commentgraph/lambda_handler.py 219 219 0%
umap_narrative/polismath_commentgraph/schemas/init.py 2 0 100%
umap_narrative/polismath_commentgraph/schemas/dynamo_models.py 80 6 92%
umap_narrative/polismath_commentgraph/tests/conftest.py 17 17 0%
umap_narrative/polismath_commentgraph/tests/test_clustering.py 74 74 0%
umap_narrative/polismath_commentgraph/tests/test_embedding.py 55 55 0%
umap_narrative/polismath_commentgraph/tests/test_storage.py 87 87 0%
umap_narrative/polismath_commentgraph/utils/init.py 9 7 22%
umap_narrative/polismath_commentgraph/utils/converter.py 283 50 82%
umap_narrative/polismath_commentgraph/utils/group_data.py 332 279 16%
umap_narrative/polismath_commentgraph/utils/storage.py 616 486 21%
umap_narrative/reset_conversation.py 162 53 67%
umap_narrative/run_pipeline.py 474 171 64%
umap_narrative/topic_naming.py 159 9 94%
Total 26459 7423 72%

This branch was successfully deployed

1 active deployment
release — 65ef5734 Deployed Nov 24, 2026 by colinmegill via publish #23
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