Skip to content

Re-enable Tier-2 8-K event defenses (#9 + #10) in Phase 4 #14

@dackclup

Description

@dackclup

Background

PR 3d shipped Tier-2 event defenses with 8-K Defenses #9 (Item 4.02 hard veto) and #10 (Item 4.01 auditor change) wired but disabled behind a module-level feature flag (compute.scoring.tier2._EIGHT_K_DEFENSES_ENABLED = False).

The deferral was forced by three workflow_dispatch timeouts (#12, #13, #14) on cold-cache runs:

After three timeouts the Tier-2 budget closed; we shipped going-concern-only.

Scope

Re-enable Defenses #9 + #10 with a re-architected fetch path that does not blow the workflow ceiling.

Implementation plan

  1. Pre-cache layer (off-cycle nightly job):

    • New workflow compute-pre-cache.yml runs daily (or every 2 days) outside the weekly compute window.
    • Iterates the universe, fetches 8-K filing list per ticker, regex-extracts items + excerpts, writes to compute/cache/edgar_8k/<ticker>.json (existing 7-day TTL cache shape).
    • Weekly compute reads the warm cache; cold-fetch path becomes rare.
  2. Flip the feature flag:

    # compute/scoring/tier2.py
    _EIGHT_K_DEFENSES_ENABLED = True

    Existing eight_k_enabled test fixture in tests/test_scoring/test_tier2.py becomes a no-op (or is removed).

  3. Re-add non_reliance_filing to active veto layer:

    • compute/scoring/risk_overlay.py already accepts non_reliance_by_ticker: dict[str, bool]. The wiring stays valid — only the upstream input changes from "always empty dict" to "populated dict".
    • Update compute/main.py line ~580 to repopulate the dict from tier2_results.
  4. Restore tier2_coverage_pct semantics:

    • With 8-K active, Tier2Result.fetch_succeeded reverts to "BOTH 10-K and 8-K succeeded".
    • Update tier2.py docstring and the relevant tests in section A.
  5. Schema bump: 0.6.0-phase3d → 0.7.0-phase4-something. Active-veto count moves from 3 (PR 3d) back to 4 (PR 3e/Phase 4).

Testing requirements

  • @pytest.mark.network integration test confirming a known 4.02 filing surfaces the veto.
  • Schema snapshot guard catches the version bump.
  • Workflow_dispatch cold-cache run completes in under 45 min with 8-K events active.

Acceptance criteria

  • compute-pre-cache.yml workflow exists and runs successfully on schedule.
  • _EIGHT_K_DEFENSES_ENABLED = True.
  • non_reliance_filing appears in risk_flags for at least one veto-eligible ticker in production output.
  • Workflow timeout returns to 45 min (revert commit 6b3c565).
  • All section A tests pass without eight_k_enabled fixture.

References

  • PR 3d perf hotfixes: 226840d (10-K filing.html()), 12ad7ff (8-K regex-on-HTML).
  • SEC Form 8-K Items 4.01 / 4.02 (Reg S-K Item 304).
  • Schroeder 2024 SSRN: ~50% of Item 4.02 filings precede formal restatement within 12 months.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions