Skip to content

test(form4_signals): PR-#224 review-nit polish — 2 of 3 quantrank-reviewer WARNs land#227

Merged
dackclup merged 1 commit into
mainfrom
claude/eager-bohr-12bQi
May 23, 2026
Merged

test(form4_signals): PR-#224 review-nit polish — 2 of 3 quantrank-reviewer WARNs land#227
dackclup merged 1 commit into
mainfrom
claude/eager-bohr-12bQi

Conversation

@dackclup
Copy link
Copy Markdown
Owner

Summary

PR #224's quantrank-reviewer left a 3-item WARN-tier punch-list. Two of the three land here as test-discipline polish; one deferred for @network verification.

Fixes landing in this PR

Fix #1 — Drop @settings(deadline=None) from 2 Hypothesis property tests (CLAUDE.md §Gotchas rule)

Touched: tests/test_scoring/test_form4_signals.py

Test Reason for original deadline=None Verification
test_cluster_monotonic_under_added_compensation_txns Carried forward from PR #222 boilerplate 40-test suite passes 0.84s; default 200ms deadline ample
test_cluster_fires_only_within_lookback Same Same

Per CLAUDE.md §Gotchas: "Don't use @settings(deadline=None) — a slow example is itself a signal." Both tests are sub-millisecond per example, so the default 200ms deadline is plenty of headroom. HealthCheck.too_slow + HealthCheck.filter_too_much suppression retained (orthogonal to the deadline rule).

Fix #2 — Reword test_strict_superset_invariant_holds_under_10b5_1_filter docstring + inline comment

The original docstring mixed set notation with the term "strict-superset" in opposite directions, which is confusing. The original inline comment claimed "c_suite requires a subset of the conditions cluster requires" — geometrically incorrect since c_suite has no $1M floor and its fire-set is NOT a strict subset of cluster's fire-set in general.

Replaced both with the unambiguous implication form:

Deferred (Fix #3 — _FOOTNOTES_REQUIRED_ATTRS manifest extension)

Original suggestion: ("get",) → ("get", "__contains__") to strengthen the drift-detector manifest.

Why deferred: this sandbox doesn't have edgartools installed, so test_D4_edgar_footnotes_api_surface_locked (the @network-gated drift detector that walks the manifest against the live Footnotes class) cannot verify that Footnotes.__contains__ actually exists. Adding the attr blindly risks a silent break under pytest --run-network on a future CI cron run.

Action: schedule the strengthening for a follow-up PR that can run @network tests first (likely after the next compute-rankings.yml cron lands so the EDGAR_USER_AGENT environment is exercised). Tracked as a one-line PR.

Files touched

File Δ Reason
tests/test_scoring/test_form4_signals.py +14 / −10 3 in-place edits (Fix #1 + Fix #2)
CLAUDE.md +26 §Phase status in-flight note
AGENTS.md +19 §Phase + version state in-flight note

Tests: 1168 → 1168 (no test added / removed; 3 in-place edits). Defense layer flag count unchanged. CLAUDE.md + AGENTS.md lockstep satisfied via §Conventions "ship with every PR" rule.

No compute / schema / scoring / valuation / frontend / Python production-code change.

Test plan

  • ruff check tests/test_scoring/test_form4_signals.py — clean
  • pytest tests/test_scoring/test_form4_signals.py — 40/40 pass in 0.84s
  • Frontend (build) CI green (doc-only change; expected pass)
  • Python (lint + test) CI green on full suite
  • Vercel preview deploys green
  • quantrank-reviewer (opus) or docs-reviewer (sonnet) pre-Mark-Ready pass

Out of scope

https://claude.ai/code/session_01JwntEE4PNAXSMkZxRA9BB4


Generated by Claude Code

…iewer WARNs land

PR #224 quantrank-reviewer WARN-tier punch-list (3 items). Two land
here as test-discipline polish; one deferred for @network verification.

(a) tests/test_scoring/test_form4_signals.py — two PR-#222 Hypothesis
    property tests drop @settings(deadline=None) per CLAUDE.md §Gotchas
    "Don't use @settings(deadline=None) — a slow example is itself a
    signal":

    - test_cluster_monotonic_under_added_compensation_txns
    - test_cluster_fires_only_within_lookback

    Both verified sub-millisecond under default 200ms Hypothesis
    deadline (40-test suite passes 0.84s offline).
    HealthCheck.too_slow + HealthCheck.filter_too_much suppression
    retained — orthogonal to the deadline rule, separate concern.

(b) test_strict_superset_invariant_holds_under_10b5_1_filter — docstring
    + inline contrapositive comment rewritten to remove the confusing
    mixed "c_suite ⊆ cluster strict-superset" notation (set symbol +
    boolean direction collided). Replaced with the unambiguous
    implication form "c_suite firing implies cluster firing (PR #222
    strict-superset, when the $1M floor is met)" + the
    ¬cluster ⟹ ¬c_suite contrapositive framing. Inline comment line
    "c_suite requires a subset of the conditions cluster requires"
    (geometrically incorrect — c_suite has no $1M floor, so its
    fire-set is NOT a strict subset of cluster's fire-set in general)
    replaced with "Contrapositive check: c_suite firing implies
    cluster firing (PR #222 strict-superset)".

(c) DEFERRED — _FOOTNOTES_REQUIRED_ATTRS manifest extension
    ("get",) → ("get", "__contains__"). Sandbox doesn't have
    edgartools installed; can't verify Footnotes.__contains__ exists
    on the live class. Adding the attr blindly risks a silent break
    under pytest --run-network on a future CI cron run. Schedule for
    a follow-up PR that can run @network tests first.

Tests: 1168 → 1168 (3 in-place edits; no test added / removed).
ruff clean. No compute / schema / scoring / valuation / frontend /
Python production-code change. CLAUDE.md + AGENTS.md lockstep
satisfied via §Phase status in-flight notes.

https://claude.ai/code/session_01JwntEE4PNAXSMkZxRA9BB4
@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quantrank Ready Ready Preview, Comment May 23, 2026 2:48pm

@dackclup dackclup marked this pull request as ready for review May 23, 2026 16:06
@dackclup dackclup merged commit 105d79e into main May 23, 2026
4 checks passed
@dackclup dackclup deleted the claude/eager-bohr-12bQi branch May 23, 2026 16:09
dackclup added a commit that referenced this pull request May 24, 2026
… ci-triage-engineer (#228)

Surfaced by the post-PR-#225 live-fire of the three new sub-agents
on 2026-05-23 (session 4). vercel-preview-auditor returned a clean
WAIT verdict citing "Vercel MCP not reachable in subagent session" —
a real infrastructure gap, not an agent prompt issue. ci-triage-engineer
worked around the same gap by falling back to git history + the
squash-merge commit body (correct fallback discipline) but hit
GitHub API rate-limits on the unauthenticated fallback path.

Root cause: the Claude Code sub-agent runtime does NOT auto-inherit
MCP tools from the parent session. Each sub-agent is restricted to
the tools listed explicitly in its `tools:` frontmatter field; MCP
tools must be enumerated by full name `mcp__<server>__<tool>`.

Two-part fix:

(a) `.claude/agents/vercel-preview-auditor.md` — `tools:` frontmatter
    extended to list 7 Vercel MCP tools by their UUID-namespaced
    name (`mcp__0addee55-c9d7-44a2-b1b2-355b2d3fc4fd__*`):
    list_deployments / get_deployment / get_deployment_build_logs /
    get_runtime_logs / web_fetch_vercel_url / get_project /
    list_projects. Hard-constraint bullet added: "If Vercel MCP
    tools are NOT in your context, surface as WAIT (MCP access gap)
    and escalate to main; do NOT fabricate deployment status." The
    UUID is OAuth-connection-specific so a fresh clone by a
    different user would have a different UUID and the pinned
    frontmatter would silently fail to match — the escalation path
    keeps the agent useful in that scenario.

(b) `.claude/agents/ci-triage-engineer.md` — `tools:` frontmatter
    extended to list 6 GitHub MCP tools (stable `mcp__github__*`
    namespace): pull_request_read / list_pull_requests / list_commits /
    get_commit / search_pull_requests / search_code. Hard-constraint
    bullet added: "If GitHub MCP unavailable, may fall back to
    local git history as primary evidence (squash-merge commit body,
    refs) — but must explicitly cite the access gap in the report;
    never fabricate check-run IDs or log URLs."

Docs:
- CLAUDE.md §Gotchas — new bullet documenting the sub-agent MCP
  inheritance limitation so future agent authors don't repeat the
  gap; lists the GitHub stable-namespace vs UUID-based connector
  distinction
- CLAUDE.md §Phase status — in-flight entry for this PR + reworded
  2 stale "in flight (this PR)" headers from PR #226 + PR #227 to
  "merged via PR #N" so the §Phase status tracker reflects post-merge
  state
- AGENTS.md §Phase + version state — mirrored in-flight entry + same
  PR #227 stale-header reword

Doc-only PR — no compute / schema / scoring / valuation / frontend /
Python / TS production-code change. Tests unchanged. ruff trivially
passes.

https://claude.ai/code/session_01JwntEE4PNAXSMkZxRA9BB4

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants