Repository navigation
Promote edge to stable: Polis 2.46.2 - #3467
Merged
Merged
Conversation
… comment but the moderated-out ones (#3462) * Delphi shadow: two more comment rules, chosen per conversation Every shadow run embeds every comment of its conversation and lays out, clusters and names the comments of one rule. Until now the only rule was participant_visible/1, what participants are shown. This adds two siblings: - all_comments/1: every comment, unmoderated, moderated in and moderated out; - all_but_moderated_out/1: every comment but the moderated-out ones, whatever strict moderation says. Each rule is one function in the input bundle contract's table (RULES), with its twin in polismath/selection.py and a golden file holding both languages to the same comments and digest. A conversation's rule is chosen by two new scheduler settings, DELPHI_SHADOW_ALL_COMMENTS and DELPHI_SHADOW_ALL_BUT_MODERATED_OUT, lists of conversation codes read as DELPHI_SHADOW_BENCHMARK is; a code in both is refused at startup by its position. Listed in neither, a conversation keeps participant_visible/1, and with both empty every run, admission and log line is what it was. The rule is an input of the run: the scheduler resolves the lists on its read login, asks for the census under the conversation's rule, and the admission's key and run record (config_effective.selection and shadow.selection, digest and count) follow from it. The selection digest carries the rule's name, so a conversation moved to another rule is never taken as unchanged and runs again at its next turn. No schema change; no new query on any pool the participation path uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Delphi shadow: comment-rule lists add runs, each rule its own job The two lists no longer choose a conversation's single rule; they add runs. Every conversation the shadow runs is still run under participant_visible/1 exactly as before, with the same keys, state entries and log lines. A code on DELPHI_SHADOW_ALL_COMMENTS or DELPHI_SHADOW_ALL_BUT_MODERATED_OUT (or on both) also gets a run under that rule, after the sets' own runs. Each (conversation, rule) is its own job: - it publishes in its own scope (delphi:all_comments, delphi:all_but_moderated_out), so no rule's results replace another's; - its "unchanged, no rerun needed" decision is read from its newest run in delphi_jobs, by the history index, never from the scheduler's state file; - its admission key is the selection digest plus the newest run it follows. A crash and restart reuses the same key and job, and a selection that changed and changed back runs as a new job rather than getting the superseded one back from the queue's binding; - a run of it still queued when the scheduler lost track of it is taken up and watched, not run a second time beside it; - its rerun window is measured by the database's own clock. The resolved codes only nominate. Each admission checks, in the census snapshot, that a code of the list still names the conversation; when none does, nothing is queued and the codes are resolved again. A code may now be on both lists. A repeated code, or a second code of a conversation already on the same list, is one run, counted in the rules log line. A failed resolution no longer holds back any other run. No schema change: the scope is free text in the existing admission function, and the history is read from existing columns on the shadow's read login. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…dentical to the server's; no caller (#3463) The minter issues anonymous, external-id and signed-in-account participant tokens with the header, claims, order, types and expiry arithmetic the Node server uses, signed with the key the process already loads. Nothing calls it: no route, switch or writer changes, and every request is answered as before. It refuses an empty conversation, issuer or audience, a user id at or below zero, and an external id that is only blanks. No token, key or external id is written to a log line, an error string or a Debug implementation. A Jest test re-mints each recorded case with the server's own issuers on every run and compares the signing bytes with the recording, so a change on either side that alters the bytes fails a public test. Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
…pied to the shadow (#3464) * participants: one participant_reply log line for a vote or comment copied to the shadow The participant middleware writes one structured log line, after its decision, for a POST /api/v3/votes or POST /api/v3/comments request that carries nginx's X-Request-Id (32 lowercase hex, the rule the vote_reply line applies): how the request identified itself, the token's conversation against this one, whether this request inserted a users row or the participant row, whether it wrote an xid binding or found one, the kind of token it issued, and on a refusal which refusal. With the request id, the route and the conversation number; never a user or participant number, an xid, a token, an email, an address, a user agent or any text. Logging only: each fact is a plain assignment where it becomes true, the line is written in a finally after the reply or next(), with no await and no database work, inside a try/catch that swallows everything. No status, body, header, token, database write or ordering changes. Without the request id, or on any other route, nothing is logged. A Jest unit test drives the new anonymous person, a participant found by its token, an external id bound and an external id found, plus a refusal, asserting the exact line for each, that nothing is logged without the request id, and that a throwing logger changes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * participants: an account check that could not be made is logged as an error, not as the account refusal The participant_reply line named every XID account error "xid_account" at warn. The account check raises that error for two different things: a refusal because the account is privileged (answered 403), and a database failure while checking (answered 500, the person never classified). Both lines were identical, so a comparison would count an outage as a policy refusal. An account error answered with a status of 500 or above is now "error", written at error; "xid_account" is kept for the refusal. Nothing a request is answered changes, and no call is added or reordered: the classifier reads the status of the error it already holds, inside the line's own try. The unit test of the line now also covers each refusal (the allow-list, Treevite, the account refusal and the account check's failure, through the real account check with only its database read mocked), the errors passed on to the error handler, the second xid lookup race and the participant insert race, a token that fails to sign, tokens of each kind from another conversation, a token bound to another xid, a signed-in account, a logger that throws on the line for every one of these, and the fields left out before the conversation is resolved, with no input copied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- 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
marked this pull request as ready for review
November 23, 2026 03:18
Contributor
Author
Delphi Coverage Report
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release plan
Version: 2.46.2
Reason: no new selected migrations
Previous stable:
344be82b03570f780e95e44041e2aab4be536162Candidate:
1346f631e3ace73871937d467fc8a28dbd4c30f2release.txt additions:
Merge the reviewed version preparation into edge, then refresh this plan for the resulting edge SHA before merging the promotion with a merge commit.