-
Notifications
You must be signed in to change notification settings - Fork 1
feat(governance): add competition events subsumption bundle #23640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| name: Antitrust Classification | ||
| rules: | ||
| - id: antitrust-01 | ||
| description: Flag mentions of anticompetitive conduct | ||
| condition: text contains "anti-competitive" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Broaden the match condition to avoid false negatives. The current condition only catches the exact hyphenated phrase and will miss common variants like 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Competition Events Runbook | ||
|
|
||
| * Alert if: | ||
| * extraction fails >5% | ||
| * schema mismatch | ||
| * SLO: 99% parse success | ||
|
Comment on lines
+4
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alert threshold conflicts with stated SLO. A 99% parse-success SLO means a 1% failure budget, but the runbook alerts only after failures exceed 5%, which is too late for SLO protection. 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Competition Events Data Handling | ||
|
|
||
| * Public news only | ||
| * Never log: | ||
| * raw prompts | ||
| * internal embeddings | ||
| * Retention: 30 days raw, permanent structured | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. “Permanent structured” retention needs a compliance guardrail. Without an explicit deletion/reevaluation policy for structured records, this creates a data-minimization and retention-risk gap. 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Competition Events Standards | ||
|
|
||
| | Format | Supported | | ||
| | ------------- | ------------ | | ||
| | JSON | ✅ | | ||
| | Graph (Neo4j) | ✅ | | ||
| | OpenAI schema | ❌ (non-goal)| |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| console.log('Benchmark script stub'); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| console.log('Monitoring script stub'); |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||||||||||||||||||
| export class CompetitionRiskAgent { | ||||||||||||||||||||||
| analyze(text: string) { | ||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||||||||||
| return { riskScore: 0.8, flags: ['antitrust'] }; | ||||||||||||||||||||||
|
Comment on lines
+2
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is functionally incorrect for a production path and will flood downstream systems with false positives. Proposed minimal baseline behavior export class CompetitionRiskAgent {
analyze(text: string) {
- return { riskScore: 0.8, flags: ['antitrust'] };
+ const normalized = text.toLowerCase();
+ const antitrustHit = /(anti-competitive|anticompetitive|antitrust|monopoly)/.test(normalized);
+ return {
+ riskScore: antitrustHit ? 0.8 : 0.1,
+ flags: antitrustHit ? ['antitrust'] : [],
+ };
}
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,11 @@ | ||||||||||||||||
| import crypto from 'node:crypto'; | ||||||||||||||||
|
|
||||||||||||||||
| export function extractCompetitionEvent(article: string) { | ||||||||||||||||
| const hash = crypto.createHash('sha256').update(article).digest('hex'); | ||||||||||||||||
|
Comment on lines
+3
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reject empty/blank articles before hashing. Creating events from blank input makes ingestion noisy and can produce duplicate placeholder events. Suggested input validation export function extractCompetitionEvent(article: string) {
+ if (!article || article.trim().length === 0) {
+ throw new Error('article must be a non-empty string');
+ }
const hash = crypto.createHash('sha256').update(article).digest('hex');
return {📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
| return { | ||||||||||||||||
| id: hash, | ||||||||||||||||
| type: "REGULATORY_COMPETITION_EVENT", | ||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The extractor returns Useful? React with 👍 / 👎. |
||||||||||||||||
| actors: [], | ||||||||||||||||
|
Comment on lines
+5
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Locate schema and inspect event field names =="
fd -i 'competitionEvent.ts' | while read -r f; do
echo "--- $f ---"
rg -n -C2 'interface\s+CompetitionEvent|event_type|type\s*:' "$f"
done
echo
echo "== Inspect connector payload fields =="
fd -i 'regulatoryNews.ts' | while read -r f; do
echo "--- $f ---"
rg -n -C2 'extractCompetitionEvent|event_type|type\s*:' "$f"
doneRepository: BrianCLong/summit Length of output: 747 Fix field name mismatch: The schema defines 🤖 Prompt for AI Agents |
||||||||||||||||
| claims: [], | ||||||||||||||||
| }; | ||||||||||||||||
| } | ||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import type { EvidenceReport } from '../evidence/types.js'; | ||
|
|
||
| export interface CompetitionEvent extends EvidenceReport { | ||
| event_type: 'REGULATORY_COMPETITION_EVENT'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use a single discriminant key across schema and extractor (
Proposed fix export interface CompetitionEvent extends EvidenceReport {
- event_type: 'REGULATORY_COMPETITION_EVENT';
+ type: 'REGULATORY_COMPETITION_EVENT';
actors: string[];
claims: string[];
}🤖 Prompt for AI Agents |
||
| actors: string[]; | ||
| claims: string[]; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Claim Registry | ||
|
|
||
| | Planned Element | Source | | ||
| | --------------------------------- | ------------- | | ||
| | Competition-risk detector | ITEM:CLAIM-02 | | ||
| | Regulatory event ingestion | ITEM:CLAIM-01 | | ||
| | Actor conflict graph edges | ITEM:CLAIM-04 | | ||
| | Market competition classification | ITEM:CLAIM-03 | | ||
| | Antitrust policy tagging | ITEM:CLAIM-05 | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| version: 1 | ||
| item: | ||
| title: "TEMPLATE: Replace with ITEM title" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace template placeholders with This manifest is still wired to Proposed fix item:
- title: "TEMPLATE: Replace with ITEM title"
+ title: "Competition Events Subsumption Bundle"
@@
-item_slug: "_template"
+item_slug: "competition-events"
@@
claim_registry:
mode: "missing-item"
- claims_file: "subsumption/_template/claims.md"
+ claims_file: "subsumption/competition-events/claims.md"
@@
prs:
- - title: "feat(governance): add subsumption bundle framework verifier"
+ - title: "feat(governance): add competition events subsumption bundle"
@@
docs_targets:
- - "docs/standards/subsumption-bundle-framework.md"
- - "docs/security/data-handling/subsumption-bundle-framework.md"
- - "docs/ops/runbooks/subsumption-bundle-framework.md"
+ - "docs/standards/competition-events.md"
+ - "docs/security/data-handling/competition-events.md"
+ - "docs/ops/runbooks/competition-events.md"
@@
fixtures:
- deny_policy_dir: "subsumption/_template/fixtures/policy/deny"
+ deny_policy_dir: "subsumption/competition-events/fixtures/policy/deny"
tests:
positive:
- - "subsumption/_template/fixtures/tests/positive/minimal_bundle"
+ - "subsumption/competition-events/fixtures/tests/positive/minimal_bundle"
negative:
- - "subsumption/_template/fixtures/tests/negative/missing_docs"
+ - "subsumption/competition-events/fixtures/tests/negative/missing_docs"Also applies to: 8-8, 12-12, 15-15, 35-37, 43-48 🤖 Prompt for AI Agents |
||
| links: [] | ||
| type: "unknown" | ||
| date_version: "unknown" | ||
| intriguing_claim: "TEMPLATE: 1–2 sentences" | ||
| item_slug: "_template" | ||
|
Comment on lines
+3
to
+8
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The manifest metadata contains placeholder values from the template. These should be updated to reflect the specific 'Competition Events' bundle. title: "Competition Events Subsumption Bundle"
links: []
type: "governance"
date_version: "1.0.0"
intriguing_claim: "Tracks regulatory competition events and anti-competitive conduct allegations."
item_slug: "competition-events"There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||
|
|
||
| claim_registry: | ||
| mode: "missing-item" | ||
| claims_file: "subsumption/_template/claims.md" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| prs: | ||
| - title: "feat(governance): add subsumption bundle framework verifier" | ||
| lane: "foundation" | ||
| owner: "master" | ||
| risk: "green" | ||
|
|
||
| gates: | ||
| - name: "verify-subsumption-bundle" | ||
| required_checks_status: "assumed" | ||
| deny_by_default_required: true | ||
|
Comment on lines
+22
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid Using Proposed hardening gates:
- name: "verify-subsumption-bundle"
- required_checks_status: "assumed"
+ required_checks_status: "required"
deny_by_default_required: true
@@
required_checks_discovery:
- status: "assumed"
+ status: "required"
instructions: "docs/required_checks.todo.md"Also applies to: 56-57 🤖 Prompt for AI Agents |
||
|
|
||
| evidence: | ||
| schemas: | ||
| report: "evidence/schemas/report.schema.json" | ||
| metrics: "evidence/schemas/metrics.schema.json" | ||
| stamp: "evidence/schemas/stamp.schema.json" | ||
| index: "evidence/index.json" | ||
| required_ids: | ||
| - "EVD-SUBSUMPTION-FRAMEWORK-GOV-001" | ||
|
|
||
| docs_targets: | ||
| - "docs/standards/subsumption-bundle-framework.md" | ||
| - "docs/security/data-handling/subsumption-bundle-framework.md" | ||
| - "docs/ops/runbooks/subsumption-bundle-framework.md" | ||
|
Comment on lines
+35
to
+37
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| - "docs/required_checks.todo.md" | ||
| - "docs/repo_assumptions.md" | ||
| - "docs/decisions/subsumption-bundle-framework.md" | ||
|
|
||
| fixtures: | ||
| deny_policy_dir: "subsumption/_template/fixtures/policy/deny" | ||
| tests: | ||
| positive: | ||
| - "subsumption/_template/fixtures/tests/positive/minimal_bundle" | ||
| negative: | ||
| - "subsumption/_template/fixtures/tests/negative/missing_docs" | ||
|
|
||
| feature_flags: [] | ||
| dependency_delta: | ||
| required_if_deps_change: true | ||
| doc_root: "deps_delta" | ||
|
|
||
| required_checks_discovery: | ||
| status: "assumed" | ||
| instructions: "docs/required_checks.todo.md" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import test from 'node:test'; | ||
| import assert from 'node:assert'; | ||
| import { extractCompetitionEvent } from '../../src/connectors/rest/regulatoryNews.js'; | ||
|
|
||
| test('extractCompetitionEvent', () => { | ||
| const article = 'OpenAI formally requested regulatory scrutiny from California AG.'; | ||
| const event = extractCompetitionEvent(article); | ||
| assert.strictEqual(event.type, 'REGULATORY_COMPETITION_EVENT'); | ||
| assert.ok(event.id); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition
text contains "anti-competitive"is case-sensitive and very specific. It will miss variations like "anticompetitive" or "Anti-competitive". Consider using a more flexible matching strategy if supported by the policy engine.