Repository navigation
Promote edge to stable: bulk upload refuses non-moderators first; Delphi math step and Ollama labels fixed; CLI fixes - #3096
Merged
Merged
Conversation
…rites a participant (#3090) POST /api/v3/comments-bulk created the caller's participant row in parallel with the moderator check, so a refused, signed-in caller was left as an existing member of the conversation. The invite-only gate admits existing members, so that caller's next vote or comment in an invite-only conversation was accepted. Any account could do this, since a first sign-in creates the local user. The moderator check now runs first and the participant is resolved only for a moderator. A new integration test sends the refused upload as a signed-in non-moderator to an invite-only conversation and requires that no participant is written and that the caller's vote is still refused; both fail against the previous handler. The moderator upload paths are unchanged (seed and vote-path recordings pass). Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…s a client to its endpoint (#3091) * delphi: launch the math step with python -P run_delphi.py started polismath/run_math_pipeline.py as a script, which puts the polismath folder first on sys.path. polismath/types.py and polismath/queue/ then shadow the standard library's types and queue, and the first standard library import of types (logging -> re -> enum) fails with a circular import, so the math stage exits 1 and the job fails. Python's -P flag leaves the script's folder off sys.path. A test checks that every script run_delphi.py launches from a folder holding a standard-library module name is launched with -P, and that the math pipeline starts that way. It fails against the previous launch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s * delphi: the Ollama provider binds a client to its endpoint OllamaProvider set `ollama.client.api_base` for any endpoint other than localhost, but the ollama package has no module-level `client`, so the constructor raised AttributeError and topic naming fell back to keyword labels on every compose stack (whose endpoint is http://ollama:11434), while the stored label still named the model. It now uses ollama.Client(host=endpoint), whose chat and list match the calls the provider already makes. The topic-naming tests use a fake provider; a new test constructs the real one with a non-default endpoint. It fails against the previous constructor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…e credentials (#3092) On a Mac, a CLI test without a saved credential fell through to the older Keychain lookup for the default profile, so test runs reached the person's real saved sign-in and showed Keychain dialogs. POLIS_KEYCHAIN=off now keeps every credential in the owner-only file store without calling the Keychain; polis-cli/.cargo/config.toml sets it for every process cargo starts, the test launchers that clear POLIS_* variables set it again, and the real-Keychain cases run only with POLIS_TEST_KEYCHAIN=1. `polis api` checked its path only inside the request, after the credential was read, and participant export and conversation close/reopen created the client before checking their inputs, so with a locked Keychain an invalid argument exited 3 (credential store) instead of 2, or failed a read that needed no credential. The request path checks are now a public check_request() that the api command runs first, and those commands validate before creating the client. A new test makes the credential store unreadable without the Keychain (a world-writable credential directory) and requires exit 2 for invalid input; it fails against the previous code. The whole CLI entry point passes on a Mac with the Keychain switched off. Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… read (#3094) The setup wizard confirmed each initial statement with GET /api/v3/comments?tids=N&moderation=true and expected exactly one row, but Node's moderation list ignores tids and returns every statement, so any setup with two or more initial statements stopped at the second one (exit 7), leaving a closed, invite-only conversation. The wizard now posts every statement, then reads the moderation list in pages and confirms each statement's number, text, approval and active state. A mock that answers like Node covers three statements and a missing one; the live setup test now uses three statements. Against a local stack, a 40-statement setup completes and opens. Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…; CI runs the admission table (#3093) * contracts: the admission model follows Node's external-ID rules again Node now checks the external-ID allow-list on every join, vote and comment for any request whose external ID is its identity, before resolving that identity, and treats a changed or unknown external ID, or a token from another owner, as a new identity. The model still predicted that known identities bypass the list and that a changed ID kept its participant: against live Node, 472 of the 2,400 admission cells disagreed. predict() now encodes both rules and all 2,400 cells match. The setup summary and the setup document describe the current behaviour, including seed authority. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s * ci: run the setup admission table so the model cannot drift from Node scripts/test-setup-admission.sh generates the contract's predictions for every entry path, action and setting, runs the observer against the sealed local Node stack, and fails on any mismatch. It reuses the images the CLI comparison builds, and the comparison workflow now runs it after the command comparison. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s * contracts: rustfmt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…s its token (#3095) Normal output printed a top-level "help" or "table" string exactly as received, and commands that pass the site's JSON through (api, conversation view, report and Delphi reads) let a site write escape sequences to the terminal: clearing the screen, faking output, or setting the clipboard where the terminal allows it. Preformatted text now goes through one cleaner that keeps line breaks and tabs and drops every other control character and every invisible formatting character. The vote prompt uses the same set of invisible characters as the conversation table. `polis join --invite` checked the receipt's login code before saving the issued participant token, so a missing or malformed code discarded the token while the one-time invite was already spent. The token is now saved first, as vote and comment already do, and the command still exits 7. Readiness joins keep saving only after the response is proved to be for the conversation. New tests cover a passed-through help text with escape, bell, C1, zero-width and bidirectional characters, and an accepted invite without a usable login code; both fail against the previous code. Claude-Session: https://claude.ai/code/session_018NVGBuYCk4EZmiz4csUv9s Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Delphi Coverage Report
|
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.
Server: POST /api/v3/comments-bulk refuses a non-moderator before resolving a participant (a refused caller no longer becomes a member of an invite-only conversation). Delphi: the math step launches with python -P (FULL_PIPELINE jobs no longer fail at it); the Ollama provider binds a client to its endpoint. CLI only: setup wizard with several initial statements, admission model matches Node (and CI runs the table), tests never touch the macOS Keychain, input checked before credentials, site text cleaned before printing, accepted invites keep their token. No schema change.