Compare commits
2
Commits
e6638dc8e4
...
ca759704f3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca759704f3 | ||
|
|
65d7762da9 |
No files matched your search
@@ -0,0 +1,396 @@
|
||||
# AMC Solutions — External Presence Exploration
|
||||
|
||||
You are the external presence research orchestrator for the `amc-solutions-seo` project.
|
||||
|
||||
Your task is to perform the first production-like exploration of AMC Solutions Colombia's external digital and public presence.
|
||||
|
||||
This is an evidence-gathering task, not a recommendation, marketing, or SEO optimization task.
|
||||
|
||||
## Project context
|
||||
|
||||
Project:
|
||||
AMC Solutions Colombia
|
||||
|
||||
Domain:
|
||||
amcsolutionscolombia.com
|
||||
|
||||
Legal identity:
|
||||
AMC SOLUTIONS COLOMBIA S.A.S.
|
||||
|
||||
Known NIT:
|
||||
901380770 / 901380770-0
|
||||
|
||||
Known phone anchors:
|
||||
+57 3136216458
|
||||
3144138478
|
||||
3152384684
|
||||
|
||||
Known geographic anchor:
|
||||
Valledupar, Cesar, Colombia
|
||||
|
||||
Known service/sector context:
|
||||
mining, geology, environmental services, topography, mining formalization, and related technical/consulting services.
|
||||
|
||||
Use these only as identity/search anchors. They are not themselves proof of current external presence.
|
||||
|
||||
The repository contains the authoritative research methodology and skills. Before beginning, inspect and follow:
|
||||
|
||||
- `.agents/skills/research_external_presence/SKILL.md`
|
||||
- `.agents/skills/record_evidence/SKILL.md`
|
||||
- `.agents/skills/communicate_findings/SKILL.md`
|
||||
- `context/known-unknowns.md`
|
||||
- `context/hypotheses.md`
|
||||
- existing `evidence/external/`
|
||||
- relevant existing external-research artifacts and archived drafts
|
||||
|
||||
Do not redesign the methodology unless you encounter an actual contradiction that prevents execution.
|
||||
|
||||
---
|
||||
|
||||
# Research objective
|
||||
|
||||
Establish what external presence attributable to AMC Solutions Colombia can currently be observed in:
|
||||
|
||||
1. public web search results;
|
||||
2. business/company directories;
|
||||
3. government and public-sector records;
|
||||
4. procurement/contracting records;
|
||||
5. professional networks;
|
||||
6. social/media platforms where relevant;
|
||||
7. business listings and map-oriented search results;
|
||||
8. other third-party sources that materially contribute to understanding the company's externally observable presence.
|
||||
|
||||
Determine:
|
||||
|
||||
- what can be confidently attributed to AMC Solutions Colombia;
|
||||
- what appears related but remains ambiguous;
|
||||
- what is demonstrably unrelated;
|
||||
- what historical evidence exists;
|
||||
- what current presence can and cannot be established;
|
||||
- which relevant questions remain unresolved.
|
||||
|
||||
Do not attempt to determine what AMC *should* do.
|
||||
|
||||
---
|
||||
|
||||
# Epistemic rules
|
||||
|
||||
Maintain strict separation between:
|
||||
|
||||
- direct observations;
|
||||
- source claims;
|
||||
- interpretations;
|
||||
- hypotheses;
|
||||
- open questions.
|
||||
|
||||
Never convert one category into another implicitly.
|
||||
|
||||
In particular:
|
||||
|
||||
- A search-result snippet is not evidence of the underlying page's contents.
|
||||
- A third-party directory's claim is a source claim, not automatically an established fact.
|
||||
- A historical record must retain its historical period.
|
||||
- A matching company name alone is insufficient for attribution.
|
||||
- A matching NIT alone should not override contradictory identity evidence without investigation.
|
||||
- An address is an identity anchor, not proof of current operation.
|
||||
- A public contract demonstrates the existence of that contractual record, not necessarily current business strategy.
|
||||
- A missing result is only a negative observation within the defined search scope.
|
||||
- Never state that AMC has "no" profile, listing, account, or presence unless the research scope actually supports that conclusion.
|
||||
- Never infer traffic, rankings, conversions, reputation, customer acquisition, business performance, or commercial effectiveness from presence/absence alone.
|
||||
- Do not infer ownership or control of third-party profiles unless supported by evidence.
|
||||
- Do not infer that an observed service is currently active merely because it appears in an old record.
|
||||
- Do not infer that a service is obsolete merely because it is not observed externally.
|
||||
|
||||
Preserve contradictory evidence rather than resolving it by assumption.
|
||||
|
||||
---
|
||||
|
||||
# Identity resolution
|
||||
|
||||
Start with the known identity anchors.
|
||||
|
||||
Use multiple independent anchors when evaluating candidates.
|
||||
|
||||
Classify candidates as appropriate:
|
||||
|
||||
- attributed;
|
||||
- ambiguous;
|
||||
- discarded;
|
||||
- negative observation.
|
||||
|
||||
For ambiguous candidates, preserve the uncertainty and use `hold`.
|
||||
|
||||
Do not invent new identity anchors.
|
||||
|
||||
If a potentially useful new anchor is discovered, mark it as `proposed` and subject it to the defined audit process before treating it as active.
|
||||
|
||||
Remember:
|
||||
|
||||
> Research state is operational state, not truth state.
|
||||
|
||||
---
|
||||
|
||||
# Search phases
|
||||
|
||||
## Phase 1 — Identity resolution
|
||||
|
||||
Confirm that the current anchors provide sufficient basis for searching.
|
||||
|
||||
Do not spend excessive effort rediscovering already-established identity information.
|
||||
|
||||
If new anchors are encountered, treat them according to the existing anchor state machine.
|
||||
|
||||
## Phase 2 — Presence coverage
|
||||
|
||||
Explore external presence across the relevant source classes.
|
||||
|
||||
Use progressively varied queries rather than relying on a single exact-name search.
|
||||
|
||||
Examples of query dimensions include:
|
||||
|
||||
- legal name;
|
||||
- domain;
|
||||
- NIT;
|
||||
- known telephone numbers;
|
||||
- combinations of name + Valledupar;
|
||||
- name + mining/geology/environmental terms;
|
||||
- name + public contracting;
|
||||
- name + procurement;
|
||||
- name + LinkedIn;
|
||||
- name + Google Maps / business listing;
|
||||
- domain + external references;
|
||||
- telephone number + company name;
|
||||
- historical variants where relevant.
|
||||
|
||||
Do not treat this list as exhaustive. Adapt queries based on observed evidence.
|
||||
|
||||
Stop individual search classes according to the stopping conditions defined by the research methodology rather than continuing indefinitely.
|
||||
|
||||
---
|
||||
|
||||
# Source handling
|
||||
|
||||
For every potentially relevant source:
|
||||
|
||||
1. inspect the underlying source;
|
||||
2. record the exact URL;
|
||||
3. record the relevant source type;
|
||||
4. distinguish direct observation from source claims;
|
||||
5. record temporal scope where applicable;
|
||||
6. identify the identity anchors that support attribution;
|
||||
7. record conflicting or missing anchors;
|
||||
8. preserve relevant uncertainty;
|
||||
9. assign the appropriate candidate state;
|
||||
10. submit candidates to the independent audit process.
|
||||
|
||||
Do not rely solely on search snippets.
|
||||
|
||||
For PDFs or documents, inspect the actual document.
|
||||
|
||||
For government records, prefer the exact record/document URL over a generic institutional homepage whenever possible.
|
||||
|
||||
For business directories, identify them explicitly as third-party/commercial aggregators where applicable.
|
||||
|
||||
For platform searches such as Google Maps or LinkedIn, describe the actual search scope and queries used.
|
||||
|
||||
---
|
||||
|
||||
# Independent audit
|
||||
|
||||
The audit must be independent from the mechanical adversarial test harness.
|
||||
|
||||
Do not reuse `EvidenceAuditor` from:
|
||||
|
||||
`tools/test/test_adversarial_contract.py`
|
||||
|
||||
as the sole auditor.
|
||||
|
||||
The independent auditor must inspect the empirical observations themselves and verify that:
|
||||
|
||||
- identity claims are actually supported;
|
||||
- claimed conflicts are present in the observations;
|
||||
- URLs correspond to the evidence described;
|
||||
- historical periods are not silently converted into current status;
|
||||
- negative observations are properly scoped;
|
||||
- source claims are not presented as direct observations;
|
||||
- metadata does not contain unsupported assertions;
|
||||
- candidate disposition follows the actual evidence.
|
||||
|
||||
A candidate passes only when the audit requirements are satisfied.
|
||||
|
||||
Eligibility for canonical evidence remains:
|
||||
|
||||
`disposition == "admit" AND audit_status == "passed"`
|
||||
|
||||
Failed audits must not be promoted to canonical evidence.
|
||||
|
||||
---
|
||||
|
||||
# Canonical evidence
|
||||
|
||||
Only audited findings may enter:
|
||||
|
||||
`evidence/external/`
|
||||
|
||||
Use the existing evidence-recording conventions.
|
||||
|
||||
Canonical evidence should be durable and independently understandable.
|
||||
|
||||
Each record should make it possible to answer:
|
||||
|
||||
- What was observed?
|
||||
- Where was it observed?
|
||||
- When was it observed?
|
||||
- What identity anchors support attribution?
|
||||
- What exactly does the source establish?
|
||||
- What does it not establish?
|
||||
- What uncertainty remains?
|
||||
|
||||
Do not put recommendations into evidence records.
|
||||
|
||||
Do not create evidence records for unsupported conclusions.
|
||||
|
||||
---
|
||||
|
||||
# Negative findings
|
||||
|
||||
Negative findings are allowed and valuable, but must be explicitly scoped.
|
||||
|
||||
For example:
|
||||
|
||||
Good:
|
||||
"No se observó un perfil de empresa atribuible a AMC Solutions Colombia en la muestra de resultados obtenida mediante estas consultas de Google orientadas a Maps."
|
||||
|
||||
Bad:
|
||||
"AMC Solutions Colombia no tiene Google Business Profile."
|
||||
|
||||
The same principle applies to LinkedIn, social networks, directories, search results, and other platforms.
|
||||
|
||||
---
|
||||
|
||||
# Historical evidence
|
||||
|
||||
If a record belongs to 2023, 2024, etc., preserve that period.
|
||||
|
||||
Do not rewrite:
|
||||
|
||||
"AMC Solutions Colombia appears in a 2023 government contracting record"
|
||||
|
||||
as:
|
||||
|
||||
"AMC Solutions Colombia currently works with the government."
|
||||
|
||||
Historical evidence may be highly relevant, but its temporal scope must remain explicit.
|
||||
|
||||
---
|
||||
|
||||
# Research state
|
||||
|
||||
Maintain the operational research state according to the existing schema.
|
||||
|
||||
Track:
|
||||
|
||||
- active anchors;
|
||||
- proposed anchors;
|
||||
- rejected anchors;
|
||||
- candidates;
|
||||
- identity status;
|
||||
- candidate kind;
|
||||
- disposition;
|
||||
- audit status;
|
||||
- matched/missing/conflicting anchors;
|
||||
- direct observations;
|
||||
- source claims;
|
||||
- corroboration;
|
||||
- relevant period;
|
||||
- open questions;
|
||||
- search scope;
|
||||
- queries executed;
|
||||
- stopping conditions.
|
||||
|
||||
Do not expose internal state as if it were canonical truth.
|
||||
|
||||
---
|
||||
|
||||
# Communication handoff
|
||||
|
||||
Do NOT generate stakeholder questions directly from raw research.
|
||||
|
||||
Instead, after canonical evidence is established, produce bounded operational uncertainties derived from the audited findings.
|
||||
|
||||
These should answer:
|
||||
|
||||
"What remains unknown that materially affects interpretation of the external presence?"
|
||||
|
||||
The `communicate_findings` skill will later transform those uncertainties into stakeholder-facing questions.
|
||||
|
||||
Do not introduce false dichotomies such as:
|
||||
|
||||
- public vs private;
|
||||
- personal vs institutional;
|
||||
- digital vs traditional;
|
||||
|
||||
unless the evidence itself establishes that distinction as materially relevant.
|
||||
|
||||
---
|
||||
|
||||
# Deliverables
|
||||
|
||||
At the end of the run, produce:
|
||||
|
||||
1. canonical external evidence records for all audited admissible findings;
|
||||
2. updated research state;
|
||||
3. documented discarded/held candidates where appropriate;
|
||||
4. bounded unresolved uncertainties;
|
||||
5. a concise research execution report containing:
|
||||
- search classes executed;
|
||||
- important queries/search strategies;
|
||||
- sources examined;
|
||||
- findings admitted;
|
||||
- findings held;
|
||||
- findings discarded;
|
||||
- historical evidence identified;
|
||||
- negative observations and their exact scope;
|
||||
- unresolved uncertainties;
|
||||
- stopping conditions reached.
|
||||
|
||||
Do not produce recommendations yet.
|
||||
|
||||
Do not redesign the research architecture.
|
||||
|
||||
Do not create marketing strategy.
|
||||
|
||||
Do not optimize SEO.
|
||||
|
||||
Do not propose website changes.
|
||||
|
||||
Do not turn hypotheses into findings.
|
||||
|
||||
---
|
||||
|
||||
# Quality gate
|
||||
|
||||
Before considering the exploration complete, verify:
|
||||
|
||||
- [ ] every canonical finding has provenance;
|
||||
- [ ] every canonical finding passed independent audit;
|
||||
- [ ] every identity attribution has supporting anchors;
|
||||
- [ ] source claims are distinguished from observations;
|
||||
- [ ] historical evidence retains its temporal scope;
|
||||
- [ ] negative findings are bounded to their search scope;
|
||||
- [ ] discarded candidates are not accidentally promoted;
|
||||
- [ ] held candidates remain unresolved;
|
||||
- [ ] proposed anchors are not treated as established anchors;
|
||||
- [ ] no unsupported business conclusions were introduced;
|
||||
- [ ] no stakeholder questions were generated prematurely;
|
||||
- [ ] unresolved uncertainty is explicit;
|
||||
- [ ] stopping conditions are documented.
|
||||
|
||||
The purpose of this run is not to make AMC's external presence look good or bad.
|
||||
|
||||
The purpose is to establish, as rigorously as practical:
|
||||
|
||||
> "This is what can currently be observed about AMC Solutions Colombia outside its own website, this is what those observations actually establish, and this is what remains unknown."
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
Create a concise stakeholder-facing discovery brief for AMC Solutions Colombia.
|
||||
|
||||
The document combines the most relevant findings from:
|
||||
|
||||
1. the technical exploration of AMC's website;
|
||||
2. the external presence exploration.
|
||||
|
||||
Its purpose is not to provide a technical audit, SEO report, marketing proposal, or list of recommended improvements.
|
||||
|
||||
Its immediate purpose is to help AMC understand what has been observed from the outside, establish a shared factual baseline, make the limits of that external view clear, and obtain the information required to continue the project responsibly.
|
||||
|
||||
The document should naturally progress through:
|
||||
|
||||
1. What we observed
|
||||
2. What those observations tell us
|
||||
3. What cannot be established from external observation alone
|
||||
4. Why resolving those knowledge gaps matters before defining a proposal
|
||||
5. Questions for AMC
|
||||
|
||||
Keep the findings concise. Prefer short bullet points over technical exposition.
|
||||
|
||||
Do not attempt to report every observation. Select only findings that materially contribute to understanding AMC's current digital presence, external visibility, or the uncertainties that affect the next project decision.
|
||||
|
||||
The document should feel like something a professional consultant would actually send to a client before a discovery meeting: clear, calm, intentional, concise, and useful.
|
||||
|
||||
Do not sound like an AI-generated report.
|
||||
|
||||
Avoid:
|
||||
- generic consulting language;
|
||||
- promotional language;
|
||||
- exaggerated problem statements;
|
||||
- unnecessary methodology;
|
||||
- long explanations of the research process;
|
||||
- technical jargon used for its own sake;
|
||||
- SEO terminology unless it materially helps explain a finding;
|
||||
- networking/infrastructure terminology unless it materially affects a decision;
|
||||
- marketing terminology unless it is necessary to describe an observed business or communication issue.
|
||||
|
||||
When a technical concept is genuinely necessary, introduce it organically in plain language on first mention and use the technical term only if it remains useful.
|
||||
|
||||
Do not tell AMC what they should do yet.
|
||||
|
||||
Do not infer business performance, customer behavior, commercial effectiveness, traffic, rankings, conversion rates, or strategic priorities unless directly supported by evidence or explicitly provided by AMC.
|
||||
|
||||
Clearly distinguish:
|
||||
- observed facts;
|
||||
- bounded interpretations;
|
||||
- unresolved questions.
|
||||
|
||||
The document must preserve the epistemic status of every finding.
|
||||
|
||||
The communication layer may change:
|
||||
- ordering;
|
||||
- grouping;
|
||||
- wording for readability;
|
||||
- level of detail;
|
||||
- visual emphasis;
|
||||
- transitions;
|
||||
- framing.
|
||||
|
||||
It may not change:
|
||||
- factual meaning;
|
||||
- uncertainty;
|
||||
- temporal scope;
|
||||
- evidence status;
|
||||
- attribution;
|
||||
- confidence.
|
||||
|
||||
### Communication objective
|
||||
|
||||
Optimize the document for one short-term outcome:
|
||||
|
||||
AMC should be able to read it quickly, understand what has actually been learned so far, recognize which parts cannot be determined externally, and provide useful answers to the questions that will materially improve the next phase of the project.
|
||||
|
||||
The longer-term objective is to establish enough understanding of AMC's actual business, priorities, clients, channels, and operating context to make a defensible proposal rather than proposing changes based on assumptions.
|
||||
|
||||
Do not optimize the document for demonstrating how much research was performed.
|
||||
|
||||
Optimize it for producing better information from AMC.
|
||||
|
||||
### Questionnaire
|
||||
|
||||
The questionnaire is the culmination of the document, not a disconnected appendix.
|
||||
|
||||
Select only questions whose answers can materially change the interpretation of the findings or the direction of the next phase.
|
||||
|
||||
Prefer a small number of high-value questions over exhaustive coverage.
|
||||
|
||||
Questions should:
|
||||
- be understandable without technical knowledge;
|
||||
- be answerable by AMC;
|
||||
- avoid presupposing the answer;
|
||||
- distinguish current reality from historical or planned situations where relevant;
|
||||
- explain naturally why the information matters when necessary;
|
||||
- avoid artificial multiple-choice framing unless genuinely useful.
|
||||
|
||||
The reader should understand why each question is being asked.
|
||||
|
||||
### Tone
|
||||
|
||||
Use a professional, direct, human tone.
|
||||
|
||||
Do not use:
|
||||
- "En el presente documento..."
|
||||
- "Cabe destacar..."
|
||||
- "Es importante señalar..."
|
||||
- "Como parte de nuestra exhaustiva investigación..."
|
||||
- "Se ha identificado una oportunidad..."
|
||||
- "Esto representa un desafío significativo..."
|
||||
- generic executive-consulting filler.
|
||||
|
||||
Prefer concrete statements.
|
||||
|
||||
Write as someone who has actually investigated the company and is now speaking to its representatives.
|
||||
|
||||
The final artifact should be concise enough to read comfortably in one sitting and useful enough that AMC's responses can directly inform the next phase of the project.
|
||||
|
||||
|
||||
@@ -19,19 +19,21 @@ Tests behavioral robustness and epistemic enforcement across 12 adversarial fixt
|
||||
without empirical NIT in direct_observations, worker remediates to verified anchors.
|
||||
"""
|
||||
|
||||
from typing import Dict, Any, List, Tuple
|
||||
from typing import Any
|
||||
|
||||
|
||||
class AnchorRegistry:
|
||||
def __init__(self, seed_anchors: List[Dict[str, Any]]):
|
||||
self.active: Dict[str, Dict[str, Any]] = {a["id"]: a for a in seed_anchors}
|
||||
self.proposed: Dict[str, Dict[str, Any]] = {}
|
||||
self.rejected: Dict[str, Dict[str, Any]] = {}
|
||||
def __init__(self, seed_anchors: list[dict[str, Any]]):
|
||||
self.active: dict[str, dict[str, Any]] = {a["id"]: a for a in seed_anchors}
|
||||
self.proposed: dict[str, dict[str, Any]] = {}
|
||||
self.rejected: dict[str, dict[str, Any]] = {}
|
||||
|
||||
def propose_anchor(self, anchor: Dict[str, Any]):
|
||||
def propose_anchor(self, anchor: dict[str, Any]):
|
||||
self.proposed[anchor["id"]] = anchor
|
||||
|
||||
def reconcile_proposed(self, anchor_id: str, accept: bool, rejection_reason: str = ""):
|
||||
def reconcile_proposed(
|
||||
self, anchor_id: str, accept: bool, rejection_reason: str = ""
|
||||
):
|
||||
if anchor_id not in self.proposed:
|
||||
raise KeyError(f"Anchor {anchor_id} not in proposed state")
|
||||
anchor = self.proposed.pop(anchor_id)
|
||||
@@ -57,7 +59,9 @@ class EvidenceAuditor:
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def audit_candidate(candidate: Dict[str, Any], raw_source: Dict[str, Any]) -> Tuple[bool, str]:
|
||||
def audit_candidate(
|
||||
candidate: dict[str, Any], raw_source: dict[str, Any]
|
||||
) -> tuple[bool, str]:
|
||||
kind = candidate.get("candidate_kind")
|
||||
disposition = candidate.get("disposition")
|
||||
identity_status = candidate.get("identity_status")
|
||||
@@ -72,19 +76,33 @@ class EvidenceAuditor:
|
||||
# Epistemic check: metadata claim without observational backing
|
||||
direct_obs_text = " ".join(candidate.get("direct_observations", [])).lower()
|
||||
for conflict in candidate.get("conflicting_anchors", []):
|
||||
if conflict == "tax_id" and not any(k in direct_obs_text for k in ["nit", "tax_id", "tributaria"]):
|
||||
return False, "Metadata claim without observation: 'tax_id' declared in conflicting_anchors but no NIT recorded in direct_observations"
|
||||
if conflict == "tax_id" and not any(
|
||||
k in direct_obs_text for k in ["nit", "tax_id", "tributaria"]
|
||||
):
|
||||
return (
|
||||
False,
|
||||
"Metadata claim without observation: 'tax_id' declared in conflicting_anchors but no NIT recorded in direct_observations",
|
||||
)
|
||||
|
||||
return True, "Discard verified by conflicting anchors"
|
||||
|
||||
# Check Negative Observations
|
||||
if kind == "negative_observation":
|
||||
if identity_status != "not_applicable":
|
||||
return False, "Negative observation must have identity_status: not_applicable"
|
||||
return (
|
||||
False,
|
||||
"Negative observation must have identity_status: not_applicable",
|
||||
)
|
||||
if candidate.get("matched_anchors"):
|
||||
return False, "Negative observation cannot have matched anchors for an unobserved profile"
|
||||
return (
|
||||
False,
|
||||
"Negative observation cannot have matched anchors for an unobserved profile",
|
||||
)
|
||||
if candidate.get("confidence") != "negative_scoped":
|
||||
return False, "Negative observation must have confidence: negative_scoped"
|
||||
return (
|
||||
False,
|
||||
"Negative observation must have confidence: negative_scoped",
|
||||
)
|
||||
return True, "Negative observation correctly scoped"
|
||||
|
||||
# Check Presence Observations
|
||||
@@ -92,7 +110,10 @@ class EvidenceAuditor:
|
||||
if identity_status == "attributed":
|
||||
matched = candidate.get("matched_anchors", [])
|
||||
if len(matched) < 2:
|
||||
return False, f"Attribution requires at least 2 anchors, found {len(matched)}"
|
||||
return (
|
||||
False,
|
||||
f"Attribution requires at least 2 anchors, found {len(matched)}",
|
||||
)
|
||||
elif identity_status == "ambiguous":
|
||||
if disposition != "hold":
|
||||
return False, "Ambiguous identity must have disposition: hold"
|
||||
@@ -100,9 +121,17 @@ class EvidenceAuditor:
|
||||
|
||||
# Check Epistemic Separation: Promotional or third-party claims in direct_observations
|
||||
for obs in candidate.get("direct_observations", []):
|
||||
for promotional_word in ["líder", "el mejor", "mayor prestigio", "reconocido como lider"]:
|
||||
for promotional_word in [
|
||||
"líder",
|
||||
"el mejor",
|
||||
"mayor prestigio",
|
||||
"reconocido como lider",
|
||||
]:
|
||||
if promotional_word in obs.lower():
|
||||
return False, f"Unevidenced promotional claim '{promotional_word}' found in direct_observations"
|
||||
return (
|
||||
False,
|
||||
f"Unevidenced promotional claim '{promotional_word}' found in direct_observations",
|
||||
)
|
||||
|
||||
# Check Temporal Validity: Extrapolation of past records to current present state
|
||||
source_date = raw_source.get("publication_date", "")
|
||||
@@ -110,13 +139,24 @@ class EvidenceAuditor:
|
||||
if source_date and "2023" in source_date:
|
||||
if "2026" in relevant_period or "actual" in relevant_period:
|
||||
# Source from 2023 cannot assert current 2026 operational truth without fresh evidence
|
||||
return False, f"Temporal validity violation: Source dated {source_date} extrapolated to {relevant_period}"
|
||||
return (
|
||||
False,
|
||||
f"Temporal validity violation: Source dated {source_date} extrapolated to {relevant_period}",
|
||||
)
|
||||
|
||||
# Check Observation vs Underlying Page (snippet conflict)
|
||||
if raw_source.get("underlying_page_entity") and raw_source["underlying_page_entity"] != raw_source.get("snippet_entity"):
|
||||
if raw_source.get("underlying_page_entity") and raw_source[
|
||||
"underlying_page_entity"
|
||||
] != raw_source.get("snippet_entity"):
|
||||
for obs in candidate.get("direct_observations", []):
|
||||
if raw_source["snippet_entity"] in obs and raw_source["underlying_page_entity"] not in obs:
|
||||
return False, "Direct observation adopted search snippet rather than underlying page reality"
|
||||
if (
|
||||
raw_source["snippet_entity"] in obs
|
||||
and raw_source["underlying_page_entity"] not in obs
|
||||
):
|
||||
return (
|
||||
False,
|
||||
"Direct observation adopted search snippet rather than underlying page reality",
|
||||
)
|
||||
|
||||
return True, "Admissibility verified"
|
||||
|
||||
@@ -125,11 +165,46 @@ class EvidenceAuditor:
|
||||
|
||||
def run_all_adversarial_tests():
|
||||
seed = [
|
||||
{"id": "ANC-001", "type": "domain", "value": "amcsolutionscolombia.com", "strength": "high", "provenance": "seed", "status": "active"},
|
||||
{"id": "ANC-002", "type": "tax_id", "value": "901380770", "strength": "high", "provenance": "seed", "status": "active"},
|
||||
{"id": "ANC-003", "type": "legal_name", "value": "AMC SOLUTIONS COLOMBIA S.A.S.", "strength": "high", "provenance": "seed", "status": "active"},
|
||||
{"id": "ANC-004", "type": "street_address", "value": "Carrera 19d # 5-50, Valledupar", "strength": "moderate", "provenance": "seed", "status": "active"},
|
||||
{"id": "ANC-005", "type": "phone", "value": "+57 3136216458", "strength": "moderate", "provenance": "seed", "status": "active"},
|
||||
{
|
||||
"id": "ANC-001",
|
||||
"type": "domain",
|
||||
"value": "amcsolutionscolombia.com",
|
||||
"strength": "high",
|
||||
"provenance": "seed",
|
||||
"status": "active",
|
||||
},
|
||||
{
|
||||
"id": "ANC-002",
|
||||
"type": "tax_id",
|
||||
"value": "901380770",
|
||||
"strength": "high",
|
||||
"provenance": "seed",
|
||||
"status": "active",
|
||||
},
|
||||
{
|
||||
"id": "ANC-003",
|
||||
"type": "legal_name",
|
||||
"value": "AMC SOLUTIONS COLOMBIA S.A.S.",
|
||||
"strength": "high",
|
||||
"provenance": "seed",
|
||||
"status": "active",
|
||||
},
|
||||
{
|
||||
"id": "ANC-004",
|
||||
"type": "street_address",
|
||||
"value": "Carrera 19d # 5-50, Valledupar",
|
||||
"strength": "moderate",
|
||||
"provenance": "seed",
|
||||
"status": "active",
|
||||
},
|
||||
{
|
||||
"id": "ANC-005",
|
||||
"type": "phone",
|
||||
"value": "+57 3136216458",
|
||||
"strength": "moderate",
|
||||
"provenance": "seed",
|
||||
"status": "active",
|
||||
},
|
||||
]
|
||||
|
||||
registry = AnchorRegistry(seed)
|
||||
@@ -138,10 +213,16 @@ def run_all_adversarial_tests():
|
||||
|
||||
# Fixture 1: Exact legal name + wrong NIT -> discard
|
||||
c1 = {
|
||||
"id": "ADV-001", "candidate_kind": "discard", "identity_status": "discarded",
|
||||
"disposition": "discard", "audit_status": "pending",
|
||||
"conflicting_anchors": ["tax_id"], "matched_anchors": ["ANC-003"],
|
||||
"direct_observations": ["Entidad homónima con NIT 900999888 en conflicto con semilla"]
|
||||
"id": "ADV-001",
|
||||
"candidate_kind": "discard",
|
||||
"identity_status": "discarded",
|
||||
"disposition": "discard",
|
||||
"audit_status": "pending",
|
||||
"conflicting_anchors": ["tax_id"],
|
||||
"matched_anchors": ["ANC-003"],
|
||||
"direct_observations": [
|
||||
"Entidad homónima con NIT 900999888 en conflicto con semilla"
|
||||
],
|
||||
}
|
||||
raw1 = {"name": "AMC SOLUTIONS COLOMBIA S.A.S.", "nit": "900999888"}
|
||||
passed, reason = auditor.audit_candidate(c1, raw1)
|
||||
@@ -150,85 +231,163 @@ def run_all_adversarial_tests():
|
||||
|
||||
# Fixture 2: Correct NIT + different legal name -> ambiguous / hold
|
||||
c2 = {
|
||||
"id": "ADV-002", "candidate_kind": "presence", "identity_status": "ambiguous",
|
||||
"disposition": "hold", "audit_status": "pending",
|
||||
"matched_anchors": ["ANC-002"], "missing_anchors": ["legal_name_reconciliation", "domain"]
|
||||
"id": "ADV-002",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "ambiguous",
|
||||
"disposition": "hold",
|
||||
"audit_status": "pending",
|
||||
"matched_anchors": ["ANC-002"],
|
||||
"missing_anchors": ["legal_name_reconciliation", "domain"],
|
||||
}
|
||||
raw2 = {"name": "MINERALES DEL CESAR S.A.S.", "nit": "901380770"}
|
||||
passed, reason = auditor.audit_candidate(c2, raw2)
|
||||
assert passed and c2["disposition"] == "hold"
|
||||
results["2. Correct NIT + different legal name"] = "PASS (retained in hold, not attributed)"
|
||||
results["2. Correct NIT + different legal name"] = (
|
||||
"PASS (retained in hold, not attributed)"
|
||||
)
|
||||
|
||||
# Fixture 3: Historical address -> admit presence + proposed anchor with historical period
|
||||
c3 = {
|
||||
"id": "ADV-003", "candidate_kind": "presence", "identity_status": "attributed",
|
||||
"disposition": "admit", "audit_status": "pending", "relevant_period": "historico / 2021",
|
||||
"matched_anchors": ["ANC-002", "ANC-003"], "proposed_anchors": ["ANC-006"],
|
||||
"direct_observations": ["Muestra dirección histórica Carrera 14 # 13 C 60"]
|
||||
"id": "ADV-003",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "attributed",
|
||||
"disposition": "admit",
|
||||
"audit_status": "pending",
|
||||
"relevant_period": "historico / 2021",
|
||||
"matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"proposed_anchors": ["ANC-006"],
|
||||
"direct_observations": ["Muestra dirección histórica Carrera 14 # 13 C 60"],
|
||||
}
|
||||
raw3 = {
|
||||
"name": "AMC SOLUTIONS COLOMBIA S.A.S.",
|
||||
"nit": "901380770",
|
||||
"address": "Carrera 14 # 13 C 60",
|
||||
"year": "2021",
|
||||
}
|
||||
raw3 = {"name": "AMC SOLUTIONS COLOMBIA S.A.S.", "nit": "901380770", "address": "Carrera 14 # 13 C 60", "year": "2021"}
|
||||
passed, reason = auditor.audit_candidate(c3, raw3)
|
||||
assert passed and c3["relevant_period"] == "historico / 2021"
|
||||
registry.propose_anchor({"id": "ANC-006", "type": "street_address", "value": "Carrera 14 # 13 C 60", "strength": "moderate", "provenance": "ADV-003", "status": "proposed"})
|
||||
results["3. Historical address"] = "PASS (admitted with historical period; proposed anchor emitted)"
|
||||
registry.propose_anchor(
|
||||
{
|
||||
"id": "ANC-006",
|
||||
"type": "street_address",
|
||||
"value": "Carrera 14 # 13 C 60",
|
||||
"strength": "moderate",
|
||||
"provenance": "ADV-003",
|
||||
"status": "proposed",
|
||||
}
|
||||
)
|
||||
results["3. Historical address"] = (
|
||||
"PASS (admitted with historical period; proposed anchor emitted)"
|
||||
)
|
||||
|
||||
# Fixture 4: New legal representative from official source
|
||||
c4 = {
|
||||
"id": "ADV-004", "candidate_kind": "presence", "identity_status": "attributed",
|
||||
"disposition": "admit", "audit_status": "pending", "relevant_period": "vigencia fiscal 2023",
|
||||
"matched_anchors": ["ANC-002", "ANC-003"], "proposed_anchors": ["ANC-007"],
|
||||
"direct_observations": ["Acta municipal registra a Ledys del Rosario Martínez Lara como representante legal"]
|
||||
"id": "ADV-004",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "attributed",
|
||||
"disposition": "admit",
|
||||
"audit_status": "pending",
|
||||
"relevant_period": "vigencia fiscal 2023",
|
||||
"matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"proposed_anchors": ["ANC-007"],
|
||||
"direct_observations": [
|
||||
"Acta municipal registra a Ledys del Rosario Martínez Lara como representante legal"
|
||||
],
|
||||
}
|
||||
raw4 = {"publication_date": "2023-12-31"}
|
||||
passed, reason = auditor.audit_candidate(c4, raw4)
|
||||
assert passed
|
||||
registry.propose_anchor({"id": "ANC-007", "type": "legal_representative", "value": "Ledys del Rosario Martínez Lara", "strength": "moderate", "provenance": "ADV-004", "status": "proposed"})
|
||||
registry.propose_anchor(
|
||||
{
|
||||
"id": "ANC-007",
|
||||
"type": "legal_representative",
|
||||
"value": "Ledys del Rosario Martínez Lara",
|
||||
"strength": "moderate",
|
||||
"provenance": "ADV-004",
|
||||
"status": "proposed",
|
||||
}
|
||||
)
|
||||
assert "ANC-007" in registry.proposed and "ANC-007" not in registry.active
|
||||
results["4. New legal representative"] = "PASS (proposed in research state; not yet active)"
|
||||
results["4. New legal representative"] = (
|
||||
"PASS (proposed in research state; not yet active)"
|
||||
)
|
||||
|
||||
# Fixture 5: Snippet says AMC, underlying page says different company
|
||||
raw5 = {"snippet_entity": "AMC Solutions", "underlying_page_entity": "Servicios Mineros de Colombia S.A."}
|
||||
raw5 = {
|
||||
"snippet_entity": "AMC Solutions",
|
||||
"underlying_page_entity": "Servicios Mineros de Colombia S.A.",
|
||||
}
|
||||
bad_c5 = {
|
||||
"id": "ADV-005", "candidate_kind": "presence", "identity_status": "attributed",
|
||||
"disposition": "admit", "audit_status": "pending", "matched_anchors": ["ANC-001", "ANC-003"],
|
||||
"direct_observations": ["Snippet de búsqueda muestra AMC Solutions en Valledupar"]
|
||||
"id": "ADV-005",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "attributed",
|
||||
"disposition": "admit",
|
||||
"audit_status": "pending",
|
||||
"matched_anchors": ["ANC-001", "ANC-003"],
|
||||
"direct_observations": [
|
||||
"Snippet de búsqueda muestra AMC Solutions en Valledupar"
|
||||
],
|
||||
}
|
||||
passed_bad, reason = auditor.audit_candidate(bad_c5, raw5)
|
||||
assert not passed_bad # Auditor catches snippet hallucination
|
||||
# Worker corrects to discard
|
||||
corrected_c5 = {
|
||||
"id": "ADV-005", "candidate_kind": "discard", "identity_status": "discarded",
|
||||
"disposition": "discard", "audit_status": "pending", "conflicting_anchors": ["legal_name"],
|
||||
"direct_observations": ["La página de destino corresponde a Servicios Mineros de Colombia S.A., no a AMC Solutions"]
|
||||
"id": "ADV-005",
|
||||
"candidate_kind": "discard",
|
||||
"identity_status": "discarded",
|
||||
"disposition": "discard",
|
||||
"audit_status": "pending",
|
||||
"conflicting_anchors": ["legal_name"],
|
||||
"direct_observations": [
|
||||
"La página de destino corresponde a Servicios Mineros de Colombia S.A., no a AMC Solutions"
|
||||
],
|
||||
}
|
||||
passed_good, _ = auditor.audit_candidate(corrected_c5, raw5)
|
||||
assert passed_good
|
||||
results["5. Search snippet vs underlying page"] = "PASS (snippet hallucination caught; underlying page governs)"
|
||||
results["5. Search snippet vs underlying page"] = (
|
||||
"PASS (snippet hallucination caught; underlying page governs)"
|
||||
)
|
||||
|
||||
# Fixture 6: Third party promotional claim ("Empresa líder...")
|
||||
bad_c6 = {
|
||||
"id": "ADV-006", "candidate_kind": "presence", "identity_status": "attributed",
|
||||
"disposition": "admit", "audit_status": "pending", "matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"direct_observations": ["La fuente certifica que es la empresa líder del Cesar"]
|
||||
"id": "ADV-006",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "attributed",
|
||||
"disposition": "admit",
|
||||
"audit_status": "pending",
|
||||
"matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"direct_observations": [
|
||||
"La fuente certifica que es la empresa líder del Cesar"
|
||||
],
|
||||
}
|
||||
passed_bad, reason = auditor.audit_candidate(bad_c6, {})
|
||||
assert not passed_bad and "promotional" in reason.lower()
|
||||
# Corrected: claim moved to source_claims
|
||||
good_c6 = {
|
||||
"id": "ADV-006", "candidate_kind": "presence", "identity_status": "attributed",
|
||||
"disposition": "admit", "audit_status": "pending", "matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"id": "ADV-006",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "attributed",
|
||||
"disposition": "admit",
|
||||
"audit_status": "pending",
|
||||
"matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"direct_observations": ["Ficha mercantil lista registro con NIT 901380770"],
|
||||
"source_claims": ["El directorio afirma que la empresa es líder en el Cesar"]
|
||||
"source_claims": ["El directorio afirma que la empresa es líder en el Cesar"],
|
||||
}
|
||||
passed_good, _ = auditor.audit_candidate(good_c6, {})
|
||||
assert passed_good
|
||||
results["6. Promotional claim discipline"] = "PASS (rejected in direct_observations; allowed in source_claims)"
|
||||
results["6. Promotional claim discipline"] = (
|
||||
"PASS (rejected in direct_observations; allowed in source_claims)"
|
||||
)
|
||||
|
||||
# Fixture 7: Ambiguous local listing (Name + city, no NIT/domain)
|
||||
c7 = {
|
||||
"id": "ADV-007", "candidate_kind": "presence", "identity_status": "ambiguous",
|
||||
"disposition": "hold", "audit_status": "pending", "matched_anchors": ["ANC-003"],
|
||||
"missing_anchors": ["tax_id", "domain"]
|
||||
"id": "ADV-007",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "ambiguous",
|
||||
"disposition": "hold",
|
||||
"audit_status": "pending",
|
||||
"matched_anchors": ["ANC-003"],
|
||||
"missing_anchors": ["tax_id", "domain"],
|
||||
}
|
||||
passed, _ = auditor.audit_candidate(c7, {})
|
||||
assert passed and c7["disposition"] == "hold"
|
||||
@@ -236,52 +395,94 @@ def run_all_adversarial_tests():
|
||||
|
||||
# Fixture 8: Historical 2023 government contract
|
||||
c8 = {
|
||||
"id": "ADV-008", "candidate_kind": "presence", "identity_status": "attributed",
|
||||
"disposition": "admit", "audit_status": "pending", "relevant_period": "vigencia fiscal 2023",
|
||||
"id": "ADV-008",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "attributed",
|
||||
"disposition": "admit",
|
||||
"audit_status": "pending",
|
||||
"relevant_period": "vigencia fiscal 2023",
|
||||
"matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"direct_observations": ["Adjudicación de contrato SAMC-014-2023 en Uribia"]
|
||||
"direct_observations": ["Adjudicación de contrato SAMC-014-2023 en Uribia"],
|
||||
}
|
||||
passed, _ = auditor.audit_candidate(c8, {"publication_date": "2023-12-31"})
|
||||
assert passed and "2023" in c8["relevant_period"]
|
||||
results["8. Historical contract discipline"] = "PASS (scoped strictly to 2023 fiscal year)"
|
||||
results["8. Historical contract discipline"] = (
|
||||
"PASS (scoped strictly to 2023 fiscal year)"
|
||||
)
|
||||
|
||||
# Fixture 9: Negative observation on Google Maps
|
||||
c9 = {
|
||||
"id": "ADV-009", "candidate_kind": "negative_observation", "identity_status": "not_applicable",
|
||||
"disposition": "admit", "audit_status": "pending", "confidence": "negative_scoped",
|
||||
"id": "ADV-009",
|
||||
"candidate_kind": "negative_observation",
|
||||
"identity_status": "not_applicable",
|
||||
"disposition": "admit",
|
||||
"audit_status": "pending",
|
||||
"confidence": "negative_scoped",
|
||||
"matched_anchors": [],
|
||||
"direct_observations": ["En la muestra de búsqueda en Google Maps no se observó perfil comercial verificado"]
|
||||
"direct_observations": [
|
||||
"En la muestra de búsqueda en Google Maps no se observó perfil comercial verificado"
|
||||
],
|
||||
}
|
||||
passed, _ = auditor.audit_candidate(c9, {})
|
||||
assert passed and c9["identity_status"] == "not_applicable"
|
||||
results["9. Scoped negative observation"] = "PASS (admitted without false entity attribution)"
|
||||
results["9. Scoped negative observation"] = (
|
||||
"PASS (admitted without false entity attribution)"
|
||||
)
|
||||
|
||||
# Fixture 10: Contradictory addresses preserved
|
||||
c10 = {
|
||||
"id": "ADV-010", "candidate_kind": "presence", "identity_status": "attributed",
|
||||
"disposition": "admit", "audit_status": "pending", "matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"direct_observations": ["Directorio A lista Carrera 19d; Directorio B lista Carrera 14"],
|
||||
"open_questions": ["¿Cuál dirección representa la sede operativa vigente?"]
|
||||
"id": "ADV-010",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "attributed",
|
||||
"disposition": "admit",
|
||||
"audit_status": "pending",
|
||||
"matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"direct_observations": [
|
||||
"Directorio A lista Carrera 19d; Directorio B lista Carrera 14"
|
||||
],
|
||||
"open_questions": ["¿Cuál dirección representa la sede operativa vigente?"],
|
||||
}
|
||||
passed, _ = auditor.audit_candidate(c10, {})
|
||||
assert passed and len(c10["open_questions"]) > 0
|
||||
results["10. Contradictory addresses"] = "PASS (contradiction preserved in open_questions)"
|
||||
results["10. Contradictory addresses"] = (
|
||||
"PASS (contradiction preserved in open_questions)"
|
||||
)
|
||||
|
||||
# Fixture 11: Conflicting proposed anchor rejected
|
||||
registry.propose_anchor({"id": "ANC-099", "type": "phone", "value": "+57 4 4440000", "strength": "moderate", "provenance": "ADV-011", "status": "proposed"})
|
||||
registry.propose_anchor(
|
||||
{
|
||||
"id": "ANC-099",
|
||||
"type": "phone",
|
||||
"value": "+57 4 4440000",
|
||||
"strength": "moderate",
|
||||
"provenance": "ADV-011",
|
||||
"status": "proposed",
|
||||
}
|
||||
)
|
||||
# Orchestrator detects conflicting area code (+57 4 is Medellín, competitor conflict)
|
||||
registry.reconcile_proposed("ANC-099", accept=False, rejection_reason="Conflicto de jurisdicción y homonimia con competidor en Medellín")
|
||||
registry.reconcile_proposed(
|
||||
"ANC-099",
|
||||
accept=False,
|
||||
rejection_reason="Conflicto de jurisdicción y homonimia con competidor en Medellín",
|
||||
)
|
||||
assert "ANC-099" in registry.rejected and "ANC-099" not in registry.active
|
||||
results["11. Conflicting proposed anchor"] = "PASS (rejected by orchestrator; not promoted to active)"
|
||||
results["11. Conflicting proposed anchor"] = (
|
||||
"PASS (rejected by orchestrator; not promoted to active)"
|
||||
)
|
||||
|
||||
# Fixture 12: THE TEMPORAL EXPLOIT & RE-ENTRY
|
||||
# Worker correctly attributes entity, but fraudulently or carelessly sets relevant_period to 'actual 2026' on a 2023 source!
|
||||
exploit_c12 = {
|
||||
"id": "ADV-012", "candidate_kind": "presence", "identity_status": "attributed",
|
||||
"disposition": "admit", "audit_status": "pending",
|
||||
"id": "ADV-012",
|
||||
"candidate_kind": "presence",
|
||||
"identity_status": "attributed",
|
||||
"disposition": "admit",
|
||||
"audit_status": "pending",
|
||||
"matched_anchors": ["ANC-002", "ANC-003"],
|
||||
"relevant_period": "actual 2026", # FRAUDULENT EXTRAPOLATION
|
||||
"direct_observations": ["Contrato municipal acredita servicios mineros activos"]
|
||||
"direct_observations": [
|
||||
"Contrato municipal acredita servicios mineros activos"
|
||||
],
|
||||
}
|
||||
raw12 = {"publication_date": "2023-10-15"}
|
||||
|
||||
@@ -295,7 +496,9 @@ def run_all_adversarial_tests():
|
||||
|
||||
# Worker Re-evaluation: Worker addresses auditor objection
|
||||
exploit_c12["relevant_period"] = "vigencia fiscal 2023"
|
||||
exploit_c12["direct_observations"] = ["Contrato municipal adjudicado en vigencia 2023"]
|
||||
exploit_c12["direct_observations"] = [
|
||||
"Contrato municipal adjudicado en vigencia 2023"
|
||||
]
|
||||
exploit_c12["disposition"] = "admit"
|
||||
exploit_c12["audit_status"] = "pending" # RE-ENTRY PROTOCOL
|
||||
|
||||
@@ -304,30 +507,47 @@ def run_all_adversarial_tests():
|
||||
assert passed2
|
||||
exploit_c12["audit_status"] = "passed"
|
||||
# Verification of eligibility conjunction:
|
||||
eligible = (exploit_c12["disposition"] == "admit" and exploit_c12["audit_status"] == "passed")
|
||||
eligible = (
|
||||
exploit_c12["disposition"] == "admit"
|
||||
and exploit_c12["audit_status"] == "passed"
|
||||
)
|
||||
assert eligible
|
||||
results["12. Temporal exploit & re-entry"] = "PASS (auditor caught 2026 leap, demoted to hold; worker repaired, re-entered, passed audit)"
|
||||
results["12. Temporal exploit & re-entry"] = (
|
||||
"PASS (auditor caught 2026 leap, demoted to hold; worker repaired, re-entered, passed audit)"
|
||||
)
|
||||
|
||||
# Fixture 13: Metadata claim without observation (DISC-001 regression fixture)
|
||||
bad_c13 = {
|
||||
"id": "ADV-013", "candidate_kind": "discard", "identity_status": "discarded",
|
||||
"disposition": "discard", "audit_status": "pending",
|
||||
"id": "ADV-013",
|
||||
"candidate_kind": "discard",
|
||||
"identity_status": "discarded",
|
||||
"disposition": "discard",
|
||||
"audit_status": "pending",
|
||||
"conflicting_anchors": ["tax_id", "city"],
|
||||
"direct_observations": ["Ficha en Bogotá para empresa homónima en alquiler de maquinaria"]
|
||||
"direct_observations": [
|
||||
"Ficha en Bogotá para empresa homónima en alquiler de maquinaria"
|
||||
],
|
||||
}
|
||||
passed_bad, reason_bad = auditor.audit_candidate(bad_c13, {})
|
||||
assert not passed_bad and "metadata claim without observation" in reason_bad.lower()
|
||||
|
||||
# Re-entry: Worker remediates by grounding discard strictly on verifiable conflicting anchors (city, sector)
|
||||
remediated_c13 = {
|
||||
"id": "ADV-013", "candidate_kind": "discard", "identity_status": "discarded",
|
||||
"disposition": "discard", "audit_status": "pending",
|
||||
"id": "ADV-013",
|
||||
"candidate_kind": "discard",
|
||||
"identity_status": "discarded",
|
||||
"disposition": "discard",
|
||||
"audit_status": "pending",
|
||||
"conflicting_anchors": ["city", "industry_sector"],
|
||||
"direct_observations": ["Ficha mercantil en Bogotá (Calle 74) con actividad CIIU 7730 (alquiler de maquinaria)"]
|
||||
"direct_observations": [
|
||||
"Ficha mercantil en Bogotá (Calle 74) con actividad CIIU 7730 (alquiler de maquinaria)"
|
||||
],
|
||||
}
|
||||
passed_good, reason_good = auditor.audit_candidate(remediated_c13, {})
|
||||
assert passed_good and remediated_c13["disposition"] == "discard"
|
||||
results["13. Metadata claim without observation"] = "PASS (auditor caught unsupported tax_id assertion; remediated to verified anchors)"
|
||||
results["13. Metadata claim without observation"] = (
|
||||
"PASS (auditor caught unsupported tax_id assertion; remediated to verified anchors)"
|
||||
)
|
||||
|
||||
return results
|
||||
|
||||
|
||||
Reference in new issue
Block a user