Skip to content

docs: ban non-causal TokenMix label-leak architectures - #7

Closed
echobt wants to merge 1 commit into
mainfrom
docs/causal-lm-ban
Closed

docs: ban non-causal TokenMix label-leak architectures#7
echobt wants to merge 1 commit into
mainfrom
docs/causal-lm-ban

Conversation

@echobt

@echobt echobt commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document the causal LM contract: dense TokenMix / time-axis Linear without a causal mask is non_causal_label_leak (Score(0), often pre-pod).

Mirrors control-plane #95 / miner-facing contract.

Test plan

  • Docs render on GitHub

Summary by CodeRabbit

  • New Features

    • Added documentation for a pre-submission similarity precheck endpoint.
    • Clarified supported ZIP and JSON payloads, response details, similarity verdicts, and matched corpus metadata.
    • Documented that prechecks do not consume submission slots or GPU evaluation.
    • Added guidance for the daily limit of three prechecks and its quota-exceeded response.
  • Documentation

    • Clarified causal language-model requirements and prohibited future-token or label access.
    • Added troubleshooting guidance for similarity results and exhausted precheck quotas.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@echobt, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a46631b3-351f-4720-b0c3-861814db2df1

📥 Commits

Reviewing files that changed from the base of the PR and between af1331d and 638f512.

📒 Files selected for processing (1)
  • docs/scoring.md
📝 Walkthrough

Walkthrough

The documentation adds the /submissions/precheck API contract, quota and similarity-result guidance, troubleshooting details, and causal sequence-mixing rules for scoring.

Changes

Precheck Documentation

Layer / File(s) Summary
Precheck API contract
docs/api.md, docs/submit.md, docs/troubleshooting.md
Documents the precheck route, payloads, response fields, similarity verdicts, daily coldkey quota, quota error, and troubleshooting behavior.
Causal scoring contract
docs/scoring.md
Defines prohibited non-causal sequence mixing, terminal zero scoring, and permitted causal alternatives.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • BaseIntelligence/prism#6: Documents the same /submissions/precheck API across the same files and adds causal-model guidance.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the documented prohibition of non-causal TokenMix label-leak architectures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 2
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch docs/causal-lm-ban
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/causal-lm-ban

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/api.md`:
- Around line 51-53: Update the precheck error documentation near the “Precheck
errors” entry to either enumerate the complete exact set of codes returned by
POST /v1/submissions/precheck, including any submit errors that apply, or remove
the ambiguous “same membership/contract codes” wording and retain only the
explicitly guaranteed codes.

In `@docs/scoring.md`:
- Around line 20-21: Update the quota wording in the precheck guidance near the
Submit reference to explicitly state that the limit is three precheck requests
per coldkey per UTC day, replacing the ambiguous shorthand while preserving the
endpoint and link.
- Around line 25-31: Update the causal-mask guidance in the scoring
documentation to define the required behavior explicitly: for each position t,
block access to every future position j > t. Retain the existing API examples
only as implementation references, and clarify that a generic or incorrectly
oriented attention mask is insufficient, matching the future-blocking behavior
used by the baseline architecture.

In `@docs/submit.md`:
- Around line 128-130: Update the quota wording in docs/submit.md lines 128-130
to state that rotating hotkeys does not reset the budget only when the coldkey
is known, and explain that unknown Owner cases fall back to hotkey-based
enforcement. Apply the same known-coldkey condition and hotkey fallback
clarification to the 429 precheck_quota_exceeded troubleshooting row in
docs/troubleshooting.md lines 12-13.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1d8c2a60-28b7-4d1a-9110-892756296c7b

📥 Commits

Reviewing files that changed from the base of the PR and between c12f201 and af1331d.

📒 Files selected for processing (4)
  • docs/api.md
  • docs/scoring.md
  • docs/submit.md
  • docs/troubleshooting.md

Comment thread docs/api.md
Comment on lines +51 to +53
Precheck errors: same membership/contract codes, plus
`429 precheck_quota_exceeded` when the 3/coldkey/UTC-day budget is spent.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n -C 8 'submissions/precheck|precheck_quota_exceeded|submission_gated' .

Repository: BaseIntelligence/prism

Length of output: 10306


🏁 Script executed:

#!/bin/bash
set -euo pipefail
fd -i 'gateway|api|submit|challenge|precheck' -t f . | sed -n '1,120p'
echo '--- candidates git ---'
git ls-files | rg -n '(^|/)(gateway|api|submit|precheck|challenge|gateway|.*\.py|.*\.js|.*\.ts|.*\.go|.*\.rs)$|^docs/submit\.md$|^docs/api\.md$|^docs/troubleshooting\.md$' | sed -n '1,220p'

Repository: BaseIntelligence/prism

Length of output: 397


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo '--- docs/api.md lines 1-80 ---'
cat -n docs/api.md | sed -n '1,80p'
echo '--- docs/submit.md relevant lines ---'
cat -n docs/submit.md | sed -n '1,135p'
echo '--- docs/troubleshooting.md relevant lines ---'
cat -n docs/troubleshooting.md | sed -n '1,20p'
echo '--- all error/copy terms ---'
rg -n -i 'precheck|quota|gateway|submission_gated|hotkey_not_in_metagraph|unknown_arch|metagraph_unavailable|readiness|409|403|404|503' docs .github README.md examples top-model 2>/dev/null || true

Repository: BaseIntelligence/prism

Length of output: 14498


Keep the existing precheck error list or replace it with the exact set.

same membership/contract codes is not a stable API contract. If 409 submission_gated, 400, or any other submit error can also appear on POST /v1/submissions/precheck, list all precheck error codes; otherwise remove the ambiguous wording.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/api.md` around lines 51 - 53, Update the precheck error documentation
near the “Precheck errors” entry to either enumerate the complete exact set of
codes returned by POST /v1/submissions/precheck, including any submit errors
that apply, or remove the ambiguous “same membership/contract codes” wording and
retain only the explicitly guaranteed codes.

Comment thread docs/scoring.md
Comment on lines +20 to +21
- Probe the cheap gate first with `POST /v1/submissions/precheck` (3/coldkey/UTC
day) — see [Submit](submit.md#precheck-similarity-before-you-submit).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

State the quota as three requests per coldkey per UTC day.

3/coldkey/UTC day does not identify the counted unit clearly. Use the full phrase from the PR contract so clients know that the limit applies to precheck requests.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/scoring.md` around lines 20 - 21, Update the quota wording in the
precheck guidance near the Submit reference to explicitly state that the limit
is three precheck requests per coldkey per UTC day, replacing the ambiguous
shorthand while preserving the endpoint and link.

Comment thread docs/scoring.md
Comment thread docs/submit.md
Comment on lines +128 to +130
**Quota: 3 attempts per coldkey per UTC day** (hotkey fallback when Owner is
unknown). Rotating hotkeys under the same coldkey does **not** reset the budget.
A 4th call returns `429` / `precheck_quota_exceeded` with `remaining=0`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Align the quota fallback wording in both documents.

Both sections state that rotating hotkeys does not reset the budget, but both also document hotkey fallback when Owner is unknown. The no-reset guarantee applies only when the coldkey is resolved.

  • docs/submit.md#L128-L130: State the known-coldkey condition and explain fallback-by-hotkey behavior.
  • docs/troubleshooting.md#L12-L13: Apply the same condition to the 429 precheck_quota_exceeded troubleshooting row.
📍 Affects 2 files
  • docs/submit.md#L128-L130 (this comment)
  • docs/troubleshooting.md#L12-L13
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/submit.md` around lines 128 - 130, Update the quota wording in
docs/submit.md lines 128-130 to state that rotating hotkeys does not reset the
budget only when the coldkey is known, and explain that unknown Owner cases fall
back to hotkey-based enforcement. Apply the same known-coldkey condition and
hotkey fallback clarification to the 429 precheck_quota_exceeded troubleshooting
row in docs/troubleshooting.md lines 12-13.

@echobt
echobt force-pushed the docs/causal-lm-ban branch from af1331d to 638f512 Compare August 8, 2026 12:01
@echobt

echobt commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

superseded by clean branch

@echobt echobt closed this Aug 8, 2026
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