feat(schema): Epic #150 Phase 1.6 — explicit tier2_enabled metadata field (closes #155)#160
Merged
Merged
Conversation
…ield (closes #155) Surfaces compute/scoring/tier2._EIGHT_K_DEFENSES_ENABLED into Metadata.tier2_enabled so verify-production-output/helper.py Section B branches on the explicit flag instead of inferring from tier2_coverage_pct > 5%. A future emergency-disable PR will now show up in the verifier output instead of silently masking itself. Schema bump 0.9.2-phase4h.2 → 0.9.3-phase4h.3. Pydantic default True for back-compat with legacy snapshots; TypeScript side optional+nullable so the stale frontend/public/data/metadata.json snapshot still casts cleanly. Helper falls back to coverage-based inference when the key is absent. 3 new regression tests (writer round-trip + Section B explicit- flag-overrides-coverage matrix). Closes the last open AC item carried forward from issue #117 (PR #149 deferred). Phase 1 of epic #150 fully closed. https://claude.ai/code/session_01Nj5sMzisnqDmF46g5ckEJn
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced May 21, 2026
dackclup
pushed a commit
that referenced
this pull request
May 21, 2026
Second deliverable from the 14-subagent full self-audit (2026-05-21).
Doc drift surfaced by `docs-reviewer` + `methodology-scientist` against
the actual production state on `a16c887` (2026-05-20 cron) + the schema
version on `compute/config.py:30`.
Five reconciles in lockstep:
(a) PHASE_STATUS.md §Current state — schema `0.9.2-phase4h.2` →
`0.9.4-phase4h.4`; defense layer headline 17 declared → 27 emitted
flags (per PR #154 reconcile); skill inventory 38 → 42; subagent
inventory added (14 in 4 tiers); active-vetoes list explicit
(7 named); recently-merged block refreshed from PR #146-back to
PRs #148-#169 (~20 PRs since `v1.2.0-phase4.5`); next-deliverables
list updated to drop the PR-#148-closed Epic #125 Item 3 entry
and add the `loss_avoidance_pattern` size-invariant follow-up.
(b) SKILL.md schema-version table — 2 missing rows added:
`0.9.3-phase4h.3` (PR #160, explicit `Metadata.tier2_enabled` field,
closes #117/#155) and `0.9.4-phase4h.4` (PR #161, additive
`valuation_methods_applicable` field on `StockDetail` and nested
in `fair_price` dict, additive only — no consumer migration).
(c) WORKFLOW.md Phase 4.5d `loss_avoidance_pattern` task — threshold
description `$5M / $0.05` → `$50M / $0.50` (PR #163 Phase 2.4
10× rescale). Adds the Phase 4 size-invariant follow-up note
(NI / TotalAssets) carried from CLAUDE.md §Gotchas since the
rescale still fires 0% on production.
(d) docs/METHODOLOGY.md — Active vetoes 4 → 7 rows: adds
`beneish_manipulation_veto` (Beneish 1999 *FAJ*),
`dechow_manipulation_veto` (Dechow 2011 *CAR* Model 1), and
`data_quality_input_corruption` (with the dual-path rule —
`risk_overlay.py` snapshot-level TBVPS guard + `ensemble.py`
output-level guard). Known-calibration-drift block refreshed:
`value_trap_risk` (Issue #11 closed via PR #166),
`going_concern_disclosure` (FP rate now 1.0% within Mayew band —
verified 5/502 on production cron),
`loss_avoidance_pattern` (still 0% after Phase 2.4 rescale,
follow-up to size-invariant), `restatement_history` (Phase 2.2
high-confidence complement via PR #165).
(e) README.md §Honest Limitations — adds Phase 2.2
`restatement_high_confidence` and Issue #11 closure (PR #166)
entries; mentions PR #163's 10× rescale on the
`loss_avoidance_pattern` line.
CLAUDE.md §Phase status + AGENTS.md §Phase + version state — matching
"Phase 2 in flight" entries per §Conventions "ship with every PR" rule.
Deferred to a follow-up Phase 2.x PR (too large for this scope):
METHODOLOGY.md annotate-only section full refresh (7 → 14+ flags) +
missing citation blocks (full Hennes-Leone-Miller 2008 *TAR*,
Cohen-Malloy-Pomorski 2012, etc.) — needs `methodology-scientist`
sign-off per the new-defense-flow rule.
Pre-commit verification:
- docs-reviewer NEEDS-CLARITY-PASS → fixed `data_quality_input_corruption`
rule description in METHODOLOGY.md to cover both veto paths
(snapshot-level `risk_overlay.py` + output-level `ensemble.py`).
- methodology-scientist findings: data_quality veto classification
CONFIRMED via dual-surface emission; value_trap / loss_avoidance /
restatement_history all CLEAN.
- phase-coordinator Mode A: COLLISION-RISK with PR #170 (Phase 1
ops hardening on `claude/enable-subagents-standby-7lMN4`) on
CLAUDE.md + AGENTS.md §Phase status block — both PRs append to
the tail. Strategy: PR #170 merges first, then this branch rebases
onto updated main; conflict is mechanical 2-paragraph merge.
No compute / schema / output / dep change. Lint passes (no Python /
TypeScript edited).
https://claude.ai/code/session_01HtcGy4F59TaawNQ7V1Eysc
Co-authored-by: Claude <noreply@anthropic.com>
dackclup
added a commit
that referenced
this pull request
May 21, 2026
…ion (#171) Second deliverable from the 14-subagent full self-audit (2026-05-21). Doc drift surfaced by `docs-reviewer` + `methodology-scientist` against the actual production state on `a16c887` (2026-05-20 cron) + the schema version on `compute/config.py:30`. Five reconciles in lockstep: (a) PHASE_STATUS.md §Current state — schema `0.9.2-phase4h.2` → `0.9.4-phase4h.4`; defense layer headline 17 declared → 27 emitted flags (per PR #154 reconcile); skill inventory 38 → 42; subagent inventory added (14 in 4 tiers); active-vetoes list explicit (7 named); recently-merged block refreshed from PR #146-back to PRs #148-#169 (~20 PRs since `v1.2.0-phase4.5`); next-deliverables list updated to drop the PR-#148-closed Epic #125 Item 3 entry and add the `loss_avoidance_pattern` size-invariant follow-up. (b) SKILL.md schema-version table — 2 missing rows added: `0.9.3-phase4h.3` (PR #160, explicit `Metadata.tier2_enabled` field, closes #117/#155) and `0.9.4-phase4h.4` (PR #161, additive `valuation_methods_applicable` field on `StockDetail` and nested in `fair_price` dict, additive only — no consumer migration). (c) WORKFLOW.md Phase 4.5d `loss_avoidance_pattern` task — threshold description `$5M / $0.05` → `$50M / $0.50` (PR #163 Phase 2.4 10× rescale). Adds the Phase 4 size-invariant follow-up note (NI / TotalAssets) carried from CLAUDE.md §Gotchas since the rescale still fires 0% on production. (d) docs/METHODOLOGY.md — Active vetoes 4 → 7 rows: adds `beneish_manipulation_veto` (Beneish 1999 *FAJ*), `dechow_manipulation_veto` (Dechow 2011 *CAR* Model 1), and `data_quality_input_corruption` (with the dual-path rule — `risk_overlay.py` snapshot-level TBVPS guard + `ensemble.py` output-level guard). Known-calibration-drift block refreshed: `value_trap_risk` (Issue #11 closed via PR #166), `going_concern_disclosure` (FP rate now 1.0% within Mayew band — verified 5/502 on production cron), `loss_avoidance_pattern` (still 0% after Phase 2.4 rescale, follow-up to size-invariant), `restatement_history` (Phase 2.2 high-confidence complement via PR #165). (e) README.md §Honest Limitations — adds Phase 2.2 `restatement_high_confidence` and Issue #11 closure (PR #166) entries; mentions PR #163's 10× rescale on the `loss_avoidance_pattern` line. CLAUDE.md §Phase status + AGENTS.md §Phase + version state — matching "Phase 2 in flight" entries per §Conventions "ship with every PR" rule. Deferred to a follow-up Phase 2.x PR (too large for this scope): METHODOLOGY.md annotate-only section full refresh (7 → 14+ flags) + missing citation blocks (full Hennes-Leone-Miller 2008 *TAR*, Cohen-Malloy-Pomorski 2012, etc.) — needs `methodology-scientist` sign-off per the new-defense-flow rule. Pre-commit verification: - docs-reviewer NEEDS-CLARITY-PASS → fixed `data_quality_input_corruption` rule description in METHODOLOGY.md to cover both veto paths (snapshot-level `risk_overlay.py` + output-level `ensemble.py`). - methodology-scientist findings: data_quality veto classification CONFIRMED via dual-surface emission; value_trap / loss_avoidance / restatement_history all CLEAN. - phase-coordinator Mode A: COLLISION-RISK with PR #170 (Phase 1 ops hardening on `claude/enable-subagents-standby-7lMN4`) on CLAUDE.md + AGENTS.md §Phase status block — both PRs append to the tail. Strategy: PR #170 merges first, then this branch rebases onto updated main; conflict is mechanical 2-paragraph merge. No compute / schema / output / dep change. Lint passes (no Python / TypeScript edited). https://claude.ai/code/session_01HtcGy4F59TaawNQ7V1Eysc Co-authored-by: Claude <noreply@anthropic.com>
dackclup
pushed a commit
that referenced
this pull request
May 24, 2026
Addresses release-captain BLOCKED-ON-PRE-FLIGHT blocker #3 from the v1.3.0 tag attempt — PHASE_STATUS.md / SKILL.md / WORKFLOW.md were 3 days + ~32 PRs stale (last touched PR #171, 2026-05-21). Brings all three docs current to main HEAD 1ff6c11 so the release-captain ladder can re-attempt cleanly. PHASE_STATUS.md - Header date 2026-05-21 → 2026-05-24 - Current state table: schema 0.9.4-phase4h.4 → 0.10.2-phase4.5e; defense layer 27 → 32 emitted flags; subagent inventory 14 → 18 (named tier roster — 4 opus / 14 sonnet); skill inventory 42 → 43; production run a16c887 → 9015748 (cron #3 2026-05-23); release- tag line annotated with v1.3.0 target pending - Recently-merged block: refreshed to PR #170 → PR #237 (~36 entries with commit shas, chronological), drops the stale PR #147-#169 block - Next-deliverables list: 5 items updated — Phase 4.5e PR 5 cluster weight promotion / Issue #67 sector-CoE flip / v1.3.0 release tag gate / Phase 4i.1-4j.1-4k.1 factor integrations / Phase 5 ML meta-learner - Open issues line: drops resolved #155 (closed via PR #160), refreshes #41 (15 open advisories, zero exploitability on static-export), refreshes #67 (data-collection merged PR #204) SKILL.md - Schema-version table: 7 new rows added in reverse-chronological order (matches existing 0.9.x convention) for `0.9.5` → `0.9.6` → `0.9.7` → `0.9.8` → `0.10.0` → `0.10.1` → `0.10.2` covering PRs #180/#181/#183/#204/#205/#222/#224. Each row carries PR # + 1-line scope + backward-compat note + literature anchor. WORKFLOW.md - Phase Overview table 4.5 row marked ✅ DONE 2026-05-23 + 10b5-1 filter scope note - SEC Filing Roadmap Form 4 row flipped "planned" → "active" with 4-PR ladder reference (#167/#205/#222/#224 + 100% coverage on cron #3) - Phase 4.5e task list — 5 items flipped `[ ]` → `[x]` with per-PR commits + methodology-scientist Mode B verdicts inline + Aboody et al. 2010 §3.2 weight-promotion gate noted - Phase 4.5 Acceptance Criteria — all 9 items flipped to `[x]` with completion evidence (cron #3 / methodology verdicts / PR refs) - Phase 4.5f tag item — flipped `[ ]` → `[x]` (`v1.2.0-phase4.5` cut 2026-05-17 at 6d414a9) PHASE_STATUS_INFLIGHT.md - Append new "(this PR)" entry under In-flight section per the PR #237 side-file convention. Documents the doc-refresh scope + cross-refs to release-captain blockers 1/2/4/5 still pending. Lockstep - PR #237's PHASE_STATUS_INFLIGHT.md side-file pattern handles the §Conventions "ship with every PR" rule for this doc-only PR - No CLAUDE.md / AGENTS.md substantive change required — the in-flight entry lives in the side-file per the new convention - No compute / schema / scoring / valuation / frontend / Python / TypeScript code change - Unblocks v1.3.0 tag blocker #3; blockers 1 (wrong-branch), 2 (pyproject.toml 0.3.0 → 1.3.0), 4 (production output 1 cron cycle behind code), and 5 (release notes draft scope) still need resolution before tag cut
dackclup
pushed a commit
that referenced
this pull request
May 24, 2026
Addresses release-captain BLOCKED-ON-PRE-FLIGHT blocker #3 from the v1.3.0 tag attempt — PHASE_STATUS.md / SKILL.md / WORKFLOW.md were 3 days + ~32 PRs stale (last touched PR #171, 2026-05-21). Brings all three docs current to main HEAD 1ff6c11 so the release-captain ladder can re-attempt cleanly. PHASE_STATUS.md - Header date 2026-05-21 → 2026-05-24 - Current state table: schema 0.9.4-phase4h.4 → 0.10.2-phase4.5e; defense layer 27 → 32 emitted flags; subagent inventory 14 → 18 (named tier roster — 4 opus / 14 sonnet); skill inventory 42 → 43; production run a16c887 → 9015748 (cron #3 2026-05-23); release- tag line annotated with v1.3.0 target pending - Recently-merged block: refreshed to PR #170 → PR #237 (~36 entries with commit shas, chronological), drops the stale PR #147-#169 block - Next-deliverables list: 5 items updated — Phase 4.5e PR 5 cluster weight promotion / Issue #67 sector-CoE flip / v1.3.0 release tag gate / Phase 4i.1-4j.1-4k.1 factor integrations / Phase 5 ML meta-learner - Open issues line: drops resolved #155 (closed via PR #160), refreshes #41 (15 open advisories, zero exploitability on static-export), refreshes #67 (data-collection merged PR #204) SKILL.md - Schema-version table: 7 new rows added in reverse-chronological order (matches existing 0.9.x convention) for `0.9.5` → `0.9.6` → `0.9.7` → `0.9.8` → `0.10.0` → `0.10.1` → `0.10.2` covering PRs #180/#181/#183/#204/#205/#222/#224. Each row carries PR # + 1-line scope + backward-compat note + literature anchor. WORKFLOW.md - Phase Overview table 4.5 row marked ✅ DONE 2026-05-23 + 10b5-1 filter scope note - SEC Filing Roadmap Form 4 row flipped "planned" → "active" with 4-PR ladder reference (#167/#205/#222/#224 + 100% coverage on cron #3) - Phase 4.5e task list — 5 items flipped `[ ]` → `[x]` with per-PR commits + methodology-scientist Mode B verdicts inline + Aboody et al. 2010 §3.2 weight-promotion gate noted - Phase 4.5 Acceptance Criteria — all 9 items flipped to `[x]` with completion evidence (cron #3 / methodology verdicts / PR refs) - Phase 4.5f tag item — flipped `[ ]` → `[x]` (`v1.2.0-phase4.5` cut 2026-05-17 at 6d414a9) PHASE_STATUS_INFLIGHT.md - Append new "(this PR)" entry under In-flight section per the PR #237 side-file convention. Documents the doc-refresh scope + cross-refs to release-captain blockers 1/2/4/5 still pending. Lockstep - PR #237's PHASE_STATUS_INFLIGHT.md side-file pattern handles the §Conventions "ship with every PR" rule for this doc-only PR - No CLAUDE.md / AGENTS.md substantive change required — the in-flight entry lives in the side-file per the new convention - No compute / schema / scoring / valuation / frontend / Python / TypeScript code change - Unblocks v1.3.0 tag blocker #3; blockers 1 (wrong-branch), 2 (pyproject.toml 0.3.0 → 1.3.0), 4 (production output 1 cron cycle behind code), and 5 (release notes draft scope) still need resolution before tag cut
dackclup
added a commit
that referenced
this pull request
May 24, 2026
…239) Addresses release-captain BLOCKED-ON-PRE-FLIGHT blocker #3 from the v1.3.0 tag attempt — PHASE_STATUS.md / SKILL.md / WORKFLOW.md were 3 days + ~32 PRs stale (last touched PR #171, 2026-05-21). Brings all three docs current to main HEAD 1ff6c11 so the release-captain ladder can re-attempt cleanly. PHASE_STATUS.md - Header date 2026-05-21 → 2026-05-24 - Current state table: schema 0.9.4-phase4h.4 → 0.10.2-phase4.5e; defense layer 27 → 32 emitted flags; subagent inventory 14 → 18 (named tier roster — 4 opus / 14 sonnet); skill inventory 42 → 43; production run a16c887 → 9015748 (cron #3 2026-05-23); release- tag line annotated with v1.3.0 target pending - Recently-merged block: refreshed to PR #170 → PR #237 (~36 entries with commit shas, chronological), drops the stale PR #147-#169 block - Next-deliverables list: 5 items updated — Phase 4.5e PR 5 cluster weight promotion / Issue #67 sector-CoE flip / v1.3.0 release tag gate / Phase 4i.1-4j.1-4k.1 factor integrations / Phase 5 ML meta-learner - Open issues line: drops resolved #155 (closed via PR #160), refreshes #41 (15 open advisories, zero exploitability on static-export), refreshes #67 (data-collection merged PR #204) SKILL.md - Schema-version table: 7 new rows added in reverse-chronological order (matches existing 0.9.x convention) for `0.9.5` → `0.9.6` → `0.9.7` → `0.9.8` → `0.10.0` → `0.10.1` → `0.10.2` covering PRs #180/#181/#183/#204/#205/#222/#224. Each row carries PR # + 1-line scope + backward-compat note + literature anchor. WORKFLOW.md - Phase Overview table 4.5 row marked ✅ DONE 2026-05-23 + 10b5-1 filter scope note - SEC Filing Roadmap Form 4 row flipped "planned" → "active" with 4-PR ladder reference (#167/#205/#222/#224 + 100% coverage on cron #3) - Phase 4.5e task list — 5 items flipped `[ ]` → `[x]` with per-PR commits + methodology-scientist Mode B verdicts inline + Aboody et al. 2010 §3.2 weight-promotion gate noted - Phase 4.5 Acceptance Criteria — all 9 items flipped to `[x]` with completion evidence (cron #3 / methodology verdicts / PR refs) - Phase 4.5f tag item — flipped `[ ]` → `[x]` (`v1.2.0-phase4.5` cut 2026-05-17 at 6d414a9) PHASE_STATUS_INFLIGHT.md - Append new "(this PR)" entry under In-flight section per the PR #237 side-file convention. Documents the doc-refresh scope + cross-refs to release-captain blockers 1/2/4/5 still pending. Lockstep - PR #237's PHASE_STATUS_INFLIGHT.md side-file pattern handles the §Conventions "ship with every PR" rule for this doc-only PR - No CLAUDE.md / AGENTS.md substantive change required — the in-flight entry lives in the side-file per the new convention - No compute / schema / scoring / valuation / frontend / Python / TypeScript code change - Unblocks v1.3.0 tag blocker #3; blockers 1 (wrong-branch), 2 (pyproject.toml 0.3.0 → 1.3.0), 4 (production output 1 cron cycle behind code), and 5 (release notes draft scope) still need resolution before tag cut Co-authored-by: Claude <noreply@anthropic.com>
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.
Summary
Implements the deferred AC item from issue #117 / PR #149 — surfaces
compute/scoring/tier2._EIGHT_K_DEFENSES_ENABLEDintoMetadata.tier2_enabledso the verifier branches on the explicit flag instead of inferring it.0.9.2-phase4h.2→0.9.3-phase4h.3Metadata.tier2_enabled: bool = Trueadded (Pydantic default for legacy back-compat)compute/main.pywriter sources from_EIGHT_K_DEFENSES_ENABLEDat run timefrontend/lib/types.tsmirrors astier2_enabled?: boolean | null(optional + nullable so the stale staticmetadata.jsonsnapshot still casts cleanly throughlib/data.ts)frontend/lib/schema-snapshot.jsonregeneratedverify-production-output/helper.pySection B readsmetadata["tier2_enabled"]when present; falls back to the prior coverage-based heuristic (tier2_coverage_pct > 5%) on legacy snapshotsdisabled_reason(tier2_enabled=Falsevstier2_coverage_pct=X%) for precisionWhy
The pre-1.6 helper inferred Tier-2 enablement from
tier2_coverage_pct > 5%. That works only while at least one 8-K defense is wired ON — if a future PR flips_EIGHT_K_DEFENSES_ENABLED = False(e.g., emergency disable during an EDGAR outage), the verifier would silently expect 0 fires AND get 0 fires, masking the disablement event. The explicit flag closes that gap.Tests
tests/test_output/test_writer.py: 2 round-trip cases (default-True + explicit-False)tests/test_verify_helper.py: 2 new branches —tier2_enabled=Falseoverrides coverage=99 → FAIL withtier2_enabled=Falsein message;tier2_enabled=Truewith coverage=0 → no fires-but-disabled diagnostictests/test_config.py: schema version assertion bumpedFull offline suite: 938 passed, 7 skipped (ipca / qlib not installed), 18 deselected (network). 3 pre-existing collection errors (
openassetpricingnot installed in this CI env, unrelated to this PR).Test plan
ruff check .cleanpython -m compute.output.schema_checkin syncpython -m pytest tests/ -m "not network"— 938 passed (excluding pre-existing collection errors)cd frontend && npx --no -- tsc --noEmit—tier2_enabled-specific TS errors resolved (pre-existing missing-node_modules errors in this env are unrelated)workflow_dispatchgreen (post-merge)Notes
tier2_enabled: boolfield toMetadataschema (epic #150 Phase 1.6) #155https://claude.ai/code/session_01Nj5sMzisnqDmF46g5ckEJn
Generated by Claude Code