Skip to content

feat(company-monitoring): classify and admit material impacts - #6470

Merged
koala73 merged 9 commits into
mainfrom
codex/issue-6011-company-impact-admission
Aug 12, 2026
Merged

koala73 merged 9 commits into
mainfrom
codex/issue-6011-company-impact-admission

Conversation

@koala73

@koala73 koala73 commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Company Monitoring can now turn normalized evidence candidates into deterministic publish, hold, reject, or expiry decisions. The model proposes structured facts only. Versioned policy owns the confidence floors, source authority, retry schedule, and final decision.

This is the admission slice after normalized evidence. Downstream impact publication remains a separate slice and is not part of this PR.

This PR does not close the target issue. The frozen admission scorer gate is not available, and its tracking issue remains open. Also, the current exact-content candidate contract cannot place two independently worded reports in one persisted candidate. That production path needs a separately approved event-level grouping contract before two-origin corroboration can clear end to end.

Design decisions

  • The classifier has no tools and must return one strict schema. Malformed, missing, contradictory, out-of-range, oversized, refused, or incomplete output fails closed.
  • Policy computes attribution, occurrence, and materiality floors independently. It counts verified first-party evidence and unique independent origins, but not ordinary social posts or syndicated copies.
  • Every decision appends its reason codes and policy, model, query, schema, retry, and evidence-selection versions. Revision and lease fences prevent stale or replay-conflicting writes.
  • Held candidates use fixed checkpoints near 6, 24, and 48 hours and reach terminal expiry by 72 hours. Transport failures use the same durable hold path and cannot leave a five-minute retry loop hidden behind healthy worker status.

Type of change

  • Bug fix
  • New feature
  • New data source / feed
  • New map layer
  • Refactor / code cleanup
  • Documentation
  • CI / Build / Infrastructure

Affected areas

  • Map / Globe
  • News panels / RSS feeds
  • AI Insights / World Brief
  • Market Radar / Crypto
  • Desktop app (Tauri)
  • API endpoints (/api/*)
  • Config / Settings
  • Other: Company Monitoring policy, Convex persistence, and Railway worker

Validation

  • npm run test:data
  • vitest run --config vitest.config.mts --maxWorkers=1 — full Convex suite
  • Focused policy, transport, worker, evidence, admission persistence, lifecycle, orchestration, and X-ingestion tests
  • npm run typecheck
  • npm run typecheck:api
  • tsc --noEmit -p convex/tsconfig.json
  • Repository pre-push gate

The checks cover all nine required fixtures, confidence boundaries, malformed and contradictory output, authority and syndication rules, held admission and expiry, replay conflicts, stale revisions, expired leases, purge safety, bounded provider responses, and transport-failure health. No credentialed live OpenRouter request was made.

Checklist

  • Tested on worldmonitor.app variant (N/A: no dashboard UI changed)
  • Tested on tech.worldmonitor.app variant (N/A: no dashboard UI changed)
  • New RSS feed domains added to api/rss-proxy.js allowlist (N/A: no feed added)
  • No API keys or secrets committed
  • TypeScript compiles without errors (npm run typecheck)
  • New or repointed health probes have a completed Railway-side pre-seed, or an owner-bound baseline acknowledgement with an entry-level expiresAt bounded to the first scheduled cron window (N/A: no health probe changed)

Documentation Alignment Checklist

  • Claim ledger attached or linked (N/A: no documentation claims changed)
  • All required Audit Council role signoffs attached (N/A)
  • Generated docs regenerated from proto where applicable (N/A: no proto changed)
  • Fixture-backed examples recomputed (N/A: no documentation examples changed)
  • Redis writers/readers enumerated for every documented key (N/A: no Redis key documented)

Rollout and rollback

Admission stays disabled unless both the OpenRouter key and classifier model are configured. After activation, monitor Company Monitoring worker outcomes and the admission decision ledger for claim or finalize errors, repeated lease expiry, a growing pending backlog, or a malformed-output reject spike. Disable the classifier configuration or revert this PR if those signals appear. Observe the first 72-hour hold window before treating the retry path as operationally accepted.

Related

Related: #6011, #6010, #6006, and #6012.

Screenshots

N/A. This PR changes backend policy and worker behavior only.


Compound Engineering

@vercel

vercel Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
worldmonitor Ready Ready Preview Aug 12, 2026 3:23am

Request Review

@koala73
koala73 merged commit 7315abe into main Aug 12, 2026
32 checks passed
@koala73
koala73 deleted the codex/issue-6011-company-impact-admission branch August 12, 2026 03:32
koala73 added a commit that referenced this pull request Aug 12, 2026
#6480)

`convex/companyMonitoring/admission-snapshot.ts` shipped in #6470 and took
the production Convex deploy down on main:

    InvalidConfig: companyMonitoring/admission-snapshot.js is not a valid
    path to a Convex module. Path component admission-snapshot.js can only
    contain alphanumeric characters, underscores, or periods.

`evaluate_push` validates before pushing anything, so this one filename
rejects the WHOLE deploy — every unrelated convex/ change merged after it
stays out of production, the same blast radius as #6232.

The convex npm package does not check the rule locally; the only "no"
comes from the server, post-merge, where nothing gates. So the rename is
paired with the pre-merge guard that reproduces the rule offline, in the
existing gate-required hygiene test rather than a new workflow.

Claude-Session: https://claude.ai/code/session_019eQ94CDZi5VAfJBh5xzCpE
koala73 added a commit that referenced this pull request Aug 12, 2026
…cause (#6479) (#6481)

On 2026-08-12 the monitor emailed "All jobs have failed" while the alarm it
existed to raise — Convex Deploy red on main after #6470 — went unnamed. Its
whole message was a transient TLS error from api.github.com. Three defects,
one symptom:

1. No retry. Every read went through one spawnSync('gh', …) that threw on any
   non-zero exit, so a transport blip was indistinguishable from a verdict.
2. No walk. That throw aborted the loop, so the workflows behind the failed
   read were never judged — a genuinely red deploy stayed invisible.
3. No vocabulary. "Could not read the record" and "the deploy failed" both
   exited 1 with the same wording.

Reads now retry only when GitHub did not answer (no `(HTTP nnn)` in stderr) or
answered 408/429/5xx. A 404 or 422 is an answer, so it fails immediately rather
than burning the job's 10-minute budget. Timeouts stay terminal for the same
budget reason as the sibling watchdog in #6478.

An unreadable workflow is now UNKNOWN/READ_FAILED, reported apart from ALARM.
UNKNOWN still exits non-zero — the module's direction-of-failure rule is that
an unreadable record never resolves to healthy — but it no longer claims a
deploy failed that the monitor never saw.

Verified: the classifier accepts the verbatim TLS stderr from run 31560494370
and rejects the verbatim 404 the live gh binary emits; the monitor runs clean
against the real repo (3/3 healthy, exit 0).

Claude-Session: https://claude.ai/code/session_019eQ94CDZi5VAfJBh5xzCpE

This branch was successfully deployed

1 active deployment
Preview — 06cbd4de Deployed Aug 12, 2026 by vercel[bot]
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