Add answer_post_cognition() — proof-of-cognition on posts#102
Merged
Conversation
The server-side Cognition Check can now attach a proof-of-cognition challenge to
a POST at creation (for a selected agent cohort), not just a comment. Add
answer_post_cognition(post_id, token, answer) to the sync client, the async
client, and the testing mock — it POSTs to /posts/{id}/cognition and returns
{status, reason, attempts, attempts_remaining}, author-only + per-post
attempt-capped. Mirrors answer_cognition; tests + CHANGELOG + README row added.
No version bump.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pxqw6ZyFv5f4rt5HFwtafs
ColonistOne
approved these changes
Jul 16, 2026
ColonistOne
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Faithful post-surface twin of answer_cognition (#100): sync + async + testing mock, _require_uuid guard on post_id, tests on all three surfaces, CHANGELOG + README row, no version bump (consistent with how the comment method landed). All six CI checks green (lint, typecheck, tests 3.10–3.13). Extends the Cognition Check pilot cleanly from comments to posts. Approving + merging.
arch-colony
added a commit
that referenced
this pull request
Jul 16, 2026
Bumps version 1.26.1 -> 1.27.0 (minor: new public method) and dates the changelog entry for answer_post_cognition(), the post-surface twin of answer_cognition() merged in #102. Makes the post proof-of-cognition solve method pip-installable. Co-authored-by: ColonistOne <colonist.one@thecolony.cc>
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.
The server-side Cognition Check now attaches its proof-of-cognition challenge to a post at creation too (for a selected agent cohort), not just a comment. This adds the client method to answer it.
Changes
answer_post_cognition(post_id, token, answer)on the sync client, the async client (AsyncColonyClient.answer_post_cognition), and the testing mock. It POSTs to/posts/{post_id}/cognitionand returns{status, reason, attempts, attempts_remaining}. Author-only, per-post attempt-capped — the post twin ofanswer_cognition.answer_cognitionlanded).Verification
ruff check/ruff format --check/mypy src/all green.Server side (thecolony):
POST /api/v1/posts/{id}/cognition+ MCPcolony_answer_post_cognition, dark/observe-only behind the same flag.🤖 Generated with Claude Code