psyclaw 0.27.22 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -5
- package/dist/apps/panel/index.html +2 -2
- package/dist/src/adapters/pi/extension.js +225 -92
- package/dist/src/adapters/pi/extension.js.map +1 -1
- package/dist/src/agents/import.js +44 -32
- package/dist/src/agents/import.js.map +1 -1
- package/dist/src/analysis/hooks.d.ts +1 -0
- package/dist/src/analysis/hooks.js +20 -1
- package/dist/src/analysis/hooks.js.map +1 -1
- package/dist/src/ars/bridge.d.ts +20 -0
- package/dist/src/ars/bridge.js +132 -0
- package/dist/src/ars/bridge.js.map +1 -0
- package/dist/src/ars/contracts.d.ts +55 -0
- package/dist/src/ars/contracts.js +2 -0
- package/dist/src/ars/contracts.js.map +1 -0
- package/dist/src/ars/panel-plan.d.ts +4 -0
- package/dist/src/ars/panel-plan.js +11 -0
- package/dist/src/ars/panel-plan.js.map +1 -0
- package/dist/src/ars/pi-panel-executor.d.ts +30 -0
- package/dist/src/ars/pi-panel-executor.js +140 -0
- package/dist/src/ars/pi-panel-executor.js.map +1 -0
- package/dist/src/ars/profile.d.ts +36 -0
- package/dist/src/ars/profile.js +119 -0
- package/dist/src/ars/profile.js.map +1 -0
- package/dist/src/ars/re-review.d.ts +22 -0
- package/dist/src/ars/re-review.js +172 -0
- package/dist/src/ars/re-review.js.map +1 -0
- package/dist/src/branding.d.ts +2 -4
- package/dist/src/branding.js +3 -5
- package/dist/src/branding.js.map +1 -1
- package/dist/src/bundled-tools.d.ts +3 -0
- package/dist/src/bundled-tools.js +21 -0
- package/dist/src/bundled-tools.js.map +1 -0
- package/dist/src/chat.js +6 -5
- package/dist/src/chat.js.map +1 -1
- package/dist/src/creation/contracts.d.ts +38 -0
- package/dist/src/creation/contracts.js +2 -0
- package/dist/src/creation/contracts.js.map +1 -0
- package/dist/src/creation/service.d.ts +7 -0
- package/dist/src/creation/service.js +196 -0
- package/dist/src/creation/service.js.map +1 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.js +10 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/install/installer.js +32 -10
- package/dist/src/install/installer.js.map +1 -1
- package/dist/src/orchestration/personas.d.ts +15 -0
- package/dist/src/orchestration/personas.js +51 -0
- package/dist/src/orchestration/personas.js.map +1 -0
- package/dist/src/orchestration/pi-executor.d.ts +1 -0
- package/dist/src/orchestration/pi-executor.js +1 -1
- package/dist/src/orchestration/pi-executor.js.map +1 -1
- package/dist/src/panel/extension.js +29 -8
- package/dist/src/panel/extension.js.map +1 -1
- package/dist/src/panel/server.js +14 -5
- package/dist/src/panel/server.js.map +1 -1
- package/dist/src/project/paths.d.ts +3 -0
- package/dist/src/project/paths.js +7 -0
- package/dist/src/project/paths.js.map +1 -1
- package/dist/src/rules/user-rules.d.ts +8 -0
- package/dist/src/rules/user-rules.js +36 -0
- package/dist/src/rules/user-rules.js.map +1 -0
- package/dist/src/skills/contracts.d.ts +4 -4
- package/dist/src/skills/recommended.js +1 -1
- package/dist/src/skills/registry.js +49 -28
- package/dist/src/skills/registry.js.map +1 -1
- package/dist/src/style/cli-ui.js +0 -1
- package/dist/src/style/cli-ui.js.map +1 -1
- package/package.json +14 -3
- package/scripts/rebrand-pi.mjs +6 -0
- package/skills/recommended/catalog.json +2 -11
- package/vendor/ars/.claude/CLAUDE.md +371 -0
- package/vendor/ars/.command-invariants.toml +24 -0
- package/vendor/ars/CITATION.cff +35 -0
- package/vendor/ars/LICENSE +417 -0
- package/vendor/ars/MODE_REGISTRY.md +76 -0
- package/vendor/ars/NOTICE.md +26 -0
- package/vendor/ars/POSITIONING.md +99 -0
- package/vendor/ars/PSYCLAW_SOURCE.json +10 -0
- package/vendor/ars/README.md +751 -0
- package/vendor/ars/SECURITY.md +52 -0
- package/vendor/ars/THIRD_PARTY.md +70 -0
- package/vendor/ars/academic-paper/SKILL.md +542 -0
- package/vendor/ars/academic-paper/agents/abstract_bilingual_agent.md +171 -0
- package/vendor/ars/academic-paper/agents/argument_builder_agent.md +276 -0
- package/vendor/ars/academic-paper/agents/citation_compliance_agent.md +422 -0
- package/vendor/ars/academic-paper/agents/draft_writer_agent.md +656 -0
- package/vendor/ars/academic-paper/agents/formatter_agent.md +999 -0
- package/vendor/ars/academic-paper/agents/intake_agent.md +393 -0
- package/vendor/ars/academic-paper/agents/literature_strategist_agent.md +626 -0
- package/vendor/ars/academic-paper/agents/peer_reviewer_agent.md +516 -0
- package/vendor/ars/academic-paper/agents/revision_coach_agent.md +334 -0
- package/vendor/ars/academic-paper/agents/socratic_mentor_agent.md +527 -0
- package/vendor/ars/academic-paper/agents/structure_architect_agent.md +401 -0
- package/vendor/ars/academic-paper/agents/visualization_agent.md +441 -0
- package/vendor/ars/academic-paper/examples/chinese_paper_example.md +278 -0
- package/vendor/ars/academic-paper/examples/clinical_citation_verification_checklist.md +95 -0
- package/vendor/ars/academic-paper/examples/clinical_epistemic_status_example.md +100 -0
- package/vendor/ars/academic-paper/examples/commitment_ledger_example.md +147 -0
- package/vendor/ars/academic-paper/examples/imrad_hei_example.md +234 -0
- package/vendor/ars/academic-paper/examples/literature_review_example.md +260 -0
- package/vendor/ars/academic-paper/examples/plan_mode_guided_writing.md +600 -0
- package/vendor/ars/academic-paper/examples/revision_mode_example.md +344 -0
- package/vendor/ars/academic-paper/examples/revision_recovery_example.md +506 -0
- package/vendor/ars/academic-paper/examples/version_family_reconciliation_example.md +89 -0
- package/vendor/ars/academic-paper/references/abstract_writing_guide.md +169 -0
- package/vendor/ars/academic-paper/references/academic_writing_style.md +188 -0
- package/vendor/ars/academic-paper/references/anti_leakage_protocol.md +83 -0
- package/vendor/ars/academic-paper/references/apa7_chinese_citation_guide.md +364 -0
- package/vendor/ars/academic-paper/references/apa7_extended_guide.md +198 -0
- package/vendor/ars/academic-paper/references/changelog.md +11 -0
- package/vendor/ars/academic-paper/references/citation_format_switcher.md +228 -0
- package/vendor/ars/academic-paper/references/committee_correspondence_protocol.md +158 -0
- package/vendor/ars/academic-paper/references/credit_authorship_guide.md +308 -0
- package/vendor/ars/academic-paper/references/disclosure_mode_protocol.md +478 -0
- package/vendor/ars/academic-paper/references/domain_evidence_profiles.md +38 -0
- package/vendor/ars/academic-paper/references/failure_paths.md +349 -0
- package/vendor/ars/academic-paper/references/funding_statement_guide.md +319 -0
- package/vendor/ars/academic-paper/references/hei_domain_glossary.md +169 -0
- package/vendor/ars/academic-paper/references/intro_title_rhetoric_guide.md +114 -0
- package/vendor/ars/academic-paper/references/journal_submission_guide.md +249 -0
- package/vendor/ars/academic-paper/references/latex_template_reference.md +378 -0
- package/vendor/ars/academic-paper/references/mode_selection_guide.md +378 -0
- package/vendor/ars/academic-paper/references/paper_structure_patterns.md +330 -0
- package/vendor/ars/academic-paper/references/plan_mode_protocol.md +112 -0
- package/vendor/ars/academic-paper/references/policy_anchor_disclosure_protocol.md +200 -0
- package/vendor/ars/academic-paper/references/policy_anchor_table.md +157 -0
- package/vendor/ars/academic-paper/references/revision_patch_protocol.md +173 -0
- package/vendor/ars/academic-paper/references/statistical_visualization_standards.md +750 -0
- package/vendor/ars/academic-paper/references/venue_disclosure_policies.md +259 -0
- package/vendor/ars/academic-paper/references/vlm_figure_verification.md +126 -0
- package/vendor/ars/academic-paper/references/workflow_phase_details.md +135 -0
- package/vendor/ars/academic-paper/references/writing_judgment_framework.md +59 -0
- package/vendor/ars/academic-paper/references/writing_quality_check.md +173 -0
- package/vendor/ars/academic-paper/templates/bilingual_abstract_template.md +78 -0
- package/vendor/ars/academic-paper/templates/case_study_template.md +129 -0
- package/vendor/ars/academic-paper/templates/conference_paper_template.md +108 -0
- package/vendor/ars/academic-paper/templates/credit_statement_template.md +132 -0
- package/vendor/ars/academic-paper/templates/funding_statement_template.md +290 -0
- package/vendor/ars/academic-paper/templates/imrad_template.md +183 -0
- package/vendor/ars/academic-paper/templates/latex_article_template.tex +199 -0
- package/vendor/ars/academic-paper/templates/literature_review_template.md +135 -0
- package/vendor/ars/academic-paper/templates/policy_brief_template.md +139 -0
- package/vendor/ars/academic-paper/templates/revision_tracking_template.md +199 -0
- package/vendor/ars/academic-paper/templates/theoretical_paper_template.md +119 -0
- package/vendor/ars/academic-paper-reviewer/SKILL.md +491 -0
- package/vendor/ars/academic-paper-reviewer/agents/devils_advocate_reviewer_agent.md +443 -0
- package/vendor/ars/academic-paper-reviewer/agents/domain_reviewer_agent.md +412 -0
- package/vendor/ars/academic-paper-reviewer/agents/editorial_synthesizer_agent.md +478 -0
- package/vendor/ars/academic-paper-reviewer/agents/eic_agent.md +339 -0
- package/vendor/ars/academic-paper-reviewer/agents/field_analyst_agent.md +221 -0
- package/vendor/ars/academic-paper-reviewer/agents/methodology_reviewer_agent.md +449 -0
- package/vendor/ars/academic-paper-reviewer/agents/perspective_reviewer_agent.md +427 -0
- package/vendor/ars/academic-paper-reviewer/examples/hei_paper_review_example.md +391 -0
- package/vendor/ars/academic-paper-reviewer/examples/interdisciplinary_review_example.md +299 -0
- package/vendor/ars/academic-paper-reviewer/examples/subclaim_decomposition_example.md +80 -0
- package/vendor/ars/academic-paper-reviewer/references/calibration_mode_protocol.md +256 -0
- package/vendor/ars/academic-paper-reviewer/references/changelog.md +10 -0
- package/vendor/ars/academic-paper-reviewer/references/editorial_decision_standards.md +236 -0
- package/vendor/ars/academic-paper-reviewer/references/guided_mode_protocol.md +34 -0
- package/vendor/ars/academic-paper-reviewer/references/integration_guide.md +15 -0
- package/vendor/ars/academic-paper-reviewer/references/quality_rubrics.md +84 -0
- package/vendor/ars/academic-paper-reviewer/references/re_review_mode_protocol.md +340 -0
- package/vendor/ars/academic-paper-reviewer/references/review_criteria_framework.md +98 -0
- package/vendor/ars/academic-paper-reviewer/references/review_panel_provenance_protocol.md +197 -0
- package/vendor/ars/academic-paper-reviewer/references/review_quality_thinking.md +58 -0
- package/vendor/ars/academic-paper-reviewer/references/reviewer_sprint_prompt_source.md +324 -0
- package/vendor/ars/academic-paper-reviewer/references/sprint_contract_protocol.md +296 -0
- package/vendor/ars/academic-paper-reviewer/references/statistical_reporting_standards.md +505 -0
- package/vendor/ars/academic-paper-reviewer/references/top_journals_by_field.md +206 -0
- package/vendor/ars/academic-paper-reviewer/templates/editorial_decision_template.md +235 -0
- package/vendor/ars/academic-paper-reviewer/templates/peer_review_report_template.md +305 -0
- package/vendor/ars/academic-paper-reviewer/templates/revision_response_template.md +248 -0
- package/vendor/ars/academic-pipeline/SKILL.md +736 -0
- package/vendor/ars/academic-pipeline/agents/claim_ref_alignment_audit_agent.md +382 -0
- package/vendor/ars/academic-pipeline/agents/collaboration_depth_agent.md +164 -0
- package/vendor/ars/academic-pipeline/agents/integrity_verification_agent.md +870 -0
- package/vendor/ars/academic-pipeline/agents/pipeline_orchestrator_agent.md +1379 -0
- package/vendor/ars/academic-pipeline/agents/state_tracker_agent.md +622 -0
- package/vendor/ars/academic-pipeline/examples/full_pipeline_example.md +482 -0
- package/vendor/ars/academic-pipeline/examples/integrity_failure_recovery.md +389 -0
- package/vendor/ars/academic-pipeline/examples/mid_entry_example.md +414 -0
- package/vendor/ars/academic-pipeline/references/adapters/.gitkeep +0 -0
- package/vendor/ars/academic-pipeline/references/adapters/overview.md +153 -0
- package/vendor/ars/academic-pipeline/references/ai_research_failure_modes.md +185 -0
- package/vendor/ars/academic-pipeline/references/changelog.md +14 -0
- package/vendor/ars/academic-pipeline/references/claim_audit_calibration_protocol.md +175 -0
- package/vendor/ars/academic-pipeline/references/claim_verification_protocol.md +282 -0
- package/vendor/ars/academic-pipeline/references/external_review_protocol.md +131 -0
- package/vendor/ars/academic-pipeline/references/integrity_review_protocol.md +110 -0
- package/vendor/ars/academic-pipeline/references/literature_corpus_consumers.md +193 -0
- package/vendor/ars/academic-pipeline/references/mode_advisor.md +135 -0
- package/vendor/ars/academic-pipeline/references/passport_as_reset_boundary.md +132 -0
- package/vendor/ars/academic-pipeline/references/pipeline_state_machine.md +405 -0
- package/vendor/ars/academic-pipeline/references/plagiarism_detection_protocol.md +239 -0
- package/vendor/ars/academic-pipeline/references/process_summary_protocol.md +209 -0
- package/vendor/ars/academic-pipeline/references/progress_dashboard_template.md +38 -0
- package/vendor/ars/academic-pipeline/references/reinforcement_content.md +15 -0
- package/vendor/ars/academic-pipeline/references/reproducibility_audit.md +55 -0
- package/vendor/ars/academic-pipeline/references/score_trajectory_protocol.md +78 -0
- package/vendor/ars/academic-pipeline/references/team_collaboration_protocol.md +261 -0
- package/vendor/ars/academic-pipeline/references/two_stage_review_protocol.md +27 -0
- package/vendor/ars/academic-pipeline/templates/pipeline_status_template.md +146 -0
- package/vendor/ars/agents/report_compiler_agent.md +341 -0
- package/vendor/ars/agents/research_architect_agent.md +298 -0
- package/vendor/ars/agents/synthesis_agent.md +356 -0
- package/vendor/ars/commands/ars-3w.md +10 -0
- package/vendor/ars/commands/ars-abstract.md +10 -0
- package/vendor/ars/commands/ars-cache-invalidate.md +20 -0
- package/vendor/ars/commands/ars-citation-check.md +10 -0
- package/vendor/ars/commands/ars-disclosure.md +10 -0
- package/vendor/ars/commands/ars-format-convert.md +10 -0
- package/vendor/ars/commands/ars-full.md +9 -0
- package/vendor/ars/commands/ars-lit-review.md +12 -0
- package/vendor/ars/commands/ars-mark-read.md +18 -0
- package/vendor/ars/commands/ars-outline.md +10 -0
- package/vendor/ars/commands/ars-plan.md +10 -0
- package/vendor/ars/commands/ars-rebuttal-audit.md +12 -0
- package/vendor/ars/commands/ars-reviewer.md +9 -0
- package/vendor/ars/commands/ars-revision-coach.md +9 -0
- package/vendor/ars/commands/ars-revision.md +10 -0
- package/vendor/ars/commands/ars-unmark-read.md +16 -0
- package/vendor/ars/deep-research/SKILL.md +600 -0
- package/vendor/ars/deep-research/agents/bibliography_agent.md +473 -0
- package/vendor/ars/deep-research/agents/devils_advocate_agent.md +192 -0
- package/vendor/ars/deep-research/agents/editor_in_chief_agent.md +167 -0
- package/vendor/ars/deep-research/agents/ethics_review_agent.md +267 -0
- package/vendor/ars/deep-research/agents/meta_analysis_agent.md +325 -0
- package/vendor/ars/deep-research/agents/monitoring_agent.md +209 -0
- package/vendor/ars/deep-research/agents/report_compiler_agent.md +341 -0
- package/vendor/ars/deep-research/agents/research_architect_agent.md +298 -0
- package/vendor/ars/deep-research/agents/research_question_agent.md +216 -0
- package/vendor/ars/deep-research/agents/risk_of_bias_agent.md +231 -0
- package/vendor/ars/deep-research/agents/socratic_mentor_agent.md +764 -0
- package/vendor/ars/deep-research/agents/source_verification_agent.md +219 -0
- package/vendor/ars/deep-research/agents/synthesis_agent.md +356 -0
- package/vendor/ars/deep-research/agents/timeline_extraction_agent.md +99 -0
- package/vendor/ars/deep-research/examples/exploratory_research.md +157 -0
- package/vendor/ars/deep-research/examples/fact_check_mode.md +173 -0
- package/vendor/ars/deep-research/examples/handoff_to_paper.md +318 -0
- package/vendor/ars/deep-research/examples/idea_diversity_coverage_gap_advisory.md +64 -0
- package/vendor/ars/deep-research/examples/policy_analysis.md +161 -0
- package/vendor/ars/deep-research/examples/review_mode.md +253 -0
- package/vendor/ars/deep-research/examples/socratic_guided_research.md +331 -0
- package/vendor/ars/deep-research/examples/systematic_review.md +133 -0
- package/vendor/ars/deep-research/references/apa7_style_guide.md +162 -0
- package/vendor/ars/deep-research/references/argumentation_reasoning_framework.md +68 -0
- package/vendor/ars/deep-research/references/arxiv_api_protocol.md +76 -0
- package/vendor/ars/deep-research/references/changelog.md +22 -0
- package/vendor/ars/deep-research/references/chinese_literature_api_protocol.md +317 -0
- package/vendor/ars/deep-research/references/cross_agent_quality_definitions.md +14 -0
- package/vendor/ars/deep-research/references/crossref_api_protocol.md +84 -0
- package/vendor/ars/deep-research/references/equator_reporting_guidelines.md +482 -0
- package/vendor/ars/deep-research/references/ethics_checklist.md +282 -0
- package/vendor/ars/deep-research/references/failure_paths.md +355 -0
- package/vendor/ars/deep-research/references/interdisciplinary_bridges.md +292 -0
- package/vendor/ars/deep-research/references/irb_decision_tree.md +315 -0
- package/vendor/ars/deep-research/references/literature_monitoring_strategies.md +263 -0
- package/vendor/ars/deep-research/references/logical_fallacies.md +192 -0
- package/vendor/ars/deep-research/references/methodology_patterns.md +462 -0
- package/vendor/ars/deep-research/references/mode_selection_guide.md +331 -0
- package/vendor/ars/deep-research/references/openalex_api_protocol.md +82 -0
- package/vendor/ars/deep-research/references/preregistration_guide.md +324 -0
- package/vendor/ars/deep-research/references/semantic_scholar_api_protocol.md +107 -0
- package/vendor/ars/deep-research/references/socratic_mode_protocol.md +99 -0
- package/vendor/ars/deep-research/references/socratic_questioning_framework.md +232 -0
- package/vendor/ars/deep-research/references/source_quality_hierarchy.md +188 -0
- package/vendor/ars/deep-research/references/systematic_review_protocol.md +95 -0
- package/vendor/ars/deep-research/references/systematic_review_toolkit.md +353 -0
- package/vendor/ars/deep-research/templates/evidence_assessment_template.md +127 -0
- package/vendor/ars/deep-research/templates/literature_matrix_template.md +85 -0
- package/vendor/ars/deep-research/templates/preregistration_template.md +318 -0
- package/vendor/ars/deep-research/templates/prisma_protocol_template.md +248 -0
- package/vendor/ars/deep-research/templates/prisma_report_template.md +415 -0
- package/vendor/ars/deep-research/templates/research_brief_template.md +93 -0
- package/vendor/ars/package.json +24 -0
- package/vendor/ars/pi/README.md +161 -0
- package/vendor/ars/pi/package.json +26 -0
- package/vendor/ars/pi/wrapper.js +193 -0
- package/vendor/ars/pi/wrapper.test.mjs +201 -0
- package/vendor/ars/pyproject.toml +2 -0
- package/vendor/ars/requirements-pdf-content-classifier.txt +5 -0
- package/vendor/ars/scripts/_block_parser.py +396 -0
- package/vendor/ars/scripts/_ci_pytest_manifest.toml +661 -0
- package/vendor/ars/scripts/_claim_audit_constants.py +268 -0
- package/vendor/ars/scripts/_e4_evidence.py +110 -0
- package/vendor/ars/scripts/_eval_threshold_gate.py +73 -0
- package/vendor/ars/scripts/_markdown_lint_util.py +224 -0
- package/vendor/ars/scripts/_next_verified_at_ms.py +176 -0
- package/vendor/ars/scripts/_passport_yaml.py +53 -0
- package/vendor/ars/scripts/_skill_lint.py +254 -0
- package/vendor/ars/scripts/_text_similarity.py +141 -0
- package/vendor/ars/scripts/adapters/README.md +89 -0
- package/vendor/ars/scripts/adapters/_common.py +209 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/expected_passport.yaml +25 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/expected_rejection_log.yaml +18 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/input_fixture/Chen2024_AIAssessment.pdf +0 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/input_fixture/Wang_2023_formative_feedback.pdf +0 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/input_fixture/paper1.pdf +0 -0
- package/vendor/ars/scripts/adapters/examples/folder_scan/input_fixture//344/270/255/346/226/207/346/252/224/345/220/215_2024.pdf +0 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/expected_passport.yaml +40 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/expected_rejection_log.yaml +13 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/.gitkeep +0 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/.obsidian/app.json +1 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/_templates/tmpl.md +7 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/chen2024ai.md +13 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/invalid.md +1 -0
- package/vendor/ars/scripts/adapters/examples/obsidian/input_fixture/vault/wang2023formative.md +10 -0
- package/vendor/ars/scripts/adapters/examples/zotero/expected_passport.yaml +34 -0
- package/vendor/ars/scripts/adapters/examples/zotero/expected_rejection_log.yaml +34 -0
- package/vendor/ars/scripts/adapters/examples/zotero/input_fixture/.gitkeep +0 -0
- package/vendor/ars/scripts/adapters/examples/zotero/input_fixture/export.json +43 -0
- package/vendor/ars/scripts/adapters/folder_scan.py +214 -0
- package/vendor/ars/scripts/adapters/obsidian.py +336 -0
- package/vendor/ars/scripts/adapters/tests/.gitkeep +0 -0
- package/vendor/ars/scripts/adapters/tests/conftest.py +77 -0
- package/vendor/ars/scripts/adapters/tests/test_check_corpus_consumer_protocol.py +632 -0
- package/vendor/ars/scripts/adapters/tests/test_check_literature_corpus_schema.py +631 -0
- package/vendor/ars/scripts/adapters/tests/test_common.py +365 -0
- package/vendor/ars/scripts/adapters/tests/test_conftest.py +96 -0
- package/vendor/ars/scripts/adapters/tests/test_folder_scan.py +260 -0
- package/vendor/ars/scripts/adapters/tests/test_literature_corpus_entry_schema.py +745 -0
- package/vendor/ars/scripts/adapters/tests/test_obsidian.py +357 -0
- package/vendor/ars/scripts/adapters/tests/test_rejection_log_schema.py +271 -0
- package/vendor/ars/scripts/adapters/tests/test_sync_adapter_docs.py +88 -0
- package/vendor/ars/scripts/adapters/tests/test_zotero.py +454 -0
- package/vendor/ars/scripts/adapters/zotero.py +318 -0
- package/vendor/ars/scripts/adjudication_activity.py +1592 -0
- package/vendor/ars/scripts/announce-ars-loaded.sh +144 -0
- package/vendor/ars/scripts/ars_anchorize_draft.py +170 -0
- package/vendor/ars/scripts/ars_apply_revision_patch.py +912 -0
- package/vendor/ars/scripts/ars_cache_invalidate.py +40 -0
- package/vendor/ars/scripts/ars_mark_read.py +521 -0
- package/vendor/ars/scripts/ars_phase_scope_manifest.json +33 -0
- package/vendor/ars/scripts/ars_update_check.sh +215 -0
- package/vendor/ars/scripts/ars_write_scope_guard.py +506 -0
- package/vendor/ars/scripts/arxiv_client.py +222 -0
- package/vendor/ars/scripts/audit_snapshot.py +572 -0
- package/vendor/ars/scripts/bibliographic_integrity_signals.py +800 -0
- package/vendor/ars/scripts/bootstrap_timeline_yaml.py +146 -0
- package/vendor/ars/scripts/build_claim_standing_candidate_ledger.py +1238 -0
- package/vendor/ars/scripts/build_claim_standing_query_plan.py +643 -0
- package/vendor/ars/scripts/build_content_coverage_advisory.py +1205 -0
- package/vendor/ars/scripts/build_cross_document_consistency_advisory.py +2332 -0
- package/vendor/ars/scripts/build_review_pathway_rule_trace.py +830 -0
- package/vendor/ars/scripts/build_submission_packet_manifest.py +2310 -0
- package/vendor/ars/scripts/check_215_field_norm.py +173 -0
- package/vendor/ars/scripts/check_216_surface_form.py +250 -0
- package/vendor/ars/scripts/check_268_nested_commitment_ledger.py +180 -0
- package/vendor/ars/scripts/check_390_revision_patch_discipline.py +296 -0
- package/vendor/ars/scripts/check_392_citation_verification_intake.py +126 -0
- package/vendor/ars/scripts/check_394_submission_policy.py +178 -0
- package/vendor/ars/scripts/check_439_format_profile.py +307 -0
- package/vendor/ars/scripts/check_619_disclosure_closeout.py +237 -0
- package/vendor/ars/scripts/check_630_codex_subscription_transport.py +456 -0
- package/vendor/ars/scripts/check_669_review_pathway_rule_trace.py +662 -0
- package/vendor/ars/scripts/check_670_revision_roadmap_integration.py +518 -0
- package/vendor/ars/scripts/check_673_adjudication_activity.py +684 -0
- package/vendor/ars/scripts/check_684_review_criteria_binding.py +557 -0
- package/vendor/ars/scripts/check_agents_mirror_sync.py +115 -0
- package/vendor/ars/scripts/check_audit_artifact_consistency.py +2313 -0
- package/vendor/ars/scripts/check_benchmark_report.py +79 -0
- package/vendor/ars/scripts/check_bibliographic_integrity_signals.py +831 -0
- package/vendor/ars/scripts/check_calibration_tiers.py +235 -0
- package/vendor/ars/scripts/check_changelog_covers_merges.py +289 -0
- package/vendor/ars/scripts/check_ci_pytest_manifest.py +204 -0
- package/vendor/ars/scripts/check_claim_audit_consistency.py +1664 -0
- package/vendor/ars/scripts/check_claim_standing_candidate_ledger_integration.py +500 -0
- package/vendor/ars/scripts/check_claim_standing_freshness.py +253 -0
- package/vendor/ars/scripts/check_claim_standing_transmissions.py +449 -0
- package/vendor/ars/scripts/check_collaboration_depth_rubric.py +180 -0
- package/vendor/ars/scripts/check_command_frontmatter_name.py +116 -0
- package/vendor/ars/scripts/check_committee_correspondence.py +333 -0
- package/vendor/ars/scripts/check_compliance_report.py +108 -0
- package/vendor/ars/scripts/check_content_coverage_advisory_integration.py +796 -0
- package/vendor/ars/scripts/check_control_availability.py +172 -0
- package/vendor/ars/scripts/check_corpus_consumer_protocol.py +404 -0
- package/vendor/ars/scripts/check_cross_document_consistency_advisory_integration.py +1191 -0
- package/vendor/ars/scripts/check_cross_model_handoff_contract.py +234 -0
- package/vendor/ars/scripts/check_cross_model_verification_sync.py +261 -0
- package/vendor/ars/scripts/check_data_access_level.py +131 -0
- package/vendor/ars/scripts/check_data_flows.py +252 -0
- package/vendor/ars/scripts/check_decision_contract.py +464 -0
- package/vendor/ars/scripts/check_degradation_registry.py +326 -0
- package/vendor/ars/scripts/check_distribution_surface_claims.py +226 -0
- package/vendor/ars/scripts/check_domain_evidence_profile.py +538 -0
- package/vendor/ars/scripts/check_e4_promotion.py +195 -0
- package/vendor/ars/scripts/check_evals_gold_set.py +279 -0
- package/vendor/ars/scripts/check_evidence_row_integration.py +396 -0
- package/vendor/ars/scripts/check_experiment_provenance.py +117 -0
- package/vendor/ars/scripts/check_field_norm_severity.py +144 -0
- package/vendor/ars/scripts/check_firm_rules_sync.py +375 -0
- package/vendor/ars/scripts/check_heldout_measurement_report.py +1179 -0
- package/vendor/ars/scripts/check_human_subjects_output_contract.py +139 -0
- package/vendor/ars/scripts/check_human_subjects_reference_migration.py +844 -0
- package/vendor/ars/scripts/check_indirect_prompt_injection_no_call.py +328 -0
- package/vendor/ars/scripts/check_instruction_data_boundary.py +236 -0
- package/vendor/ars/scripts/check_judge_prompt_version.py +125 -0
- package/vendor/ars/scripts/check_literature_corpus_schema.py +402 -0
- package/vendor/ars/scripts/check_model_tiering.py +223 -0
- package/vendor/ars/scripts/check_panel_synthesis.py +1331 -0
- package/vendor/ars/scripts/check_passport_reset_contract.py +214 -0
- package/vendor/ars/scripts/check_pattern_eval_manifest.py +422 -0
- package/vendor/ars/scripts/check_persuasion_invariance_fixtures.py +637 -0
- package/vendor/ars/scripts/check_phase_conformance.py +2180 -0
- package/vendor/ars/scripts/check_pipeline_boundary_semantics.py +600 -0
- package/vendor/ars/scripts/check_pipeline_integrity.py +340 -0
- package/vendor/ars/scripts/check_policy_anchor_protocol.py +159 -0
- package/vendor/ars/scripts/check_policy_anchor_table.py +286 -0
- package/vendor/ars/scripts/check_preprint_venues_consistency.py +123 -0
- package/vendor/ars/scripts/check_prisma_trAIce_freshness.py +84 -0
- package/vendor/ars/scripts/check_promotion_bakeoff_preregistration.py +1303 -0
- package/vendor/ars/scripts/check_ranking_lift.py +323 -0
- package/vendor/ars/scripts/check_re_review_synthesis.py +2719 -0
- package/vendor/ars/scripts/check_receipt_enum_sync.py +203 -0
- package/vendor/ars/scripts/check_repro_lock.py +85 -0
- package/vendor/ars/scripts/check_review_pathway_output.py +276 -0
- package/vendor/ars/scripts/check_reviewer_data_fences.py +224 -0
- package/vendor/ars/scripts/check_reviewer_finding_contract.py +783 -0
- package/vendor/ars/scripts/check_reviewer_role_label.py +447 -0
- package/vendor/ars/scripts/check_reviewer_scoring_honesty.py +292 -0
- package/vendor/ars/scripts/check_reviewer_sprint_prompt_sync.py +409 -0
- package/vendor/ars/scripts/check_revision_claim_drift_suite_v2.py +1622 -0
- package/vendor/ars/scripts/check_revision_token_conservation.py +263 -0
- package/vendor/ars/scripts/check_risk_register.py +280 -0
- package/vendor/ars/scripts/check_role_scoped_contract.py +702 -0
- package/vendor/ars/scripts/check_rq_framing_patterns.py +184 -0
- package/vendor/ars/scripts/check_rubric_weight_consistency.py +32 -0
- package/vendor/ars/scripts/check_seeded_defect_fixtures.py +425 -0
- package/vendor/ars/scripts/check_setup_cross_model_parity.py +139 -0
- package/vendor/ars/scripts/check_spec_consistency.py +1249 -0
- package/vendor/ars/scripts/check_sprint_contract.py +371 -0
- package/vendor/ars/scripts/check_stage_capability_matrix.py +784 -0
- package/vendor/ars/scripts/check_submission_packet_manifest_integration.py +358 -0
- package/vendor/ars/scripts/check_surface_form_parity.py +445 -0
- package/vendor/ars/scripts/check_task_type.py +22 -0
- package/vendor/ars/scripts/check_tools_allowlist.py +538 -0
- package/vendor/ars/scripts/check_tortured_phrase_screening_integration.py +1974 -0
- package/vendor/ars/scripts/check_v3_10_134_write_scope.py +286 -0
- package/vendor/ars/scripts/check_v3_10_policy.py +656 -0
- package/vendor/ars/scripts/check_v3_6_6_ab_manifest.py +364 -0
- package/vendor/ars/scripts/check_v3_6_7_pattern_protection.py +1366 -0
- package/vendor/ars/scripts/check_v3_6_8_audit_scope_block.py +464 -0
- package/vendor/ars/scripts/check_v3_6_8_cite_provenance_pipeline.py +231 -0
- package/vendor/ars/scripts/check_v3_6_8_frontmatter_trust_schema.py +248 -0
- package/vendor/ars/scripts/check_v3_6_8_mark_read_commands.py +79 -0
- package/vendor/ars/scripts/check_v3_6_8_pattern_protection.py +941 -0
- package/vendor/ars/scripts/check_v3_7_3_three_layer_citation.py +318 -0
- package/vendor/ars/scripts/check_v3_8_annotation_literal_sync.py +228 -0
- package/vendor/ars/scripts/check_v3_9_0_triangulation.py +366 -0
- package/vendor/ars/scripts/check_v3_9_2_phase_boundary.py +270 -0
- package/vendor/ars/scripts/check_v3_9_4_temporal_verification.py +139 -0
- package/vendor/ars/scripts/check_venue_disclosure_policies.py +63 -0
- package/vendor/ars/scripts/check_version_consistency.py +826 -0
- package/vendor/ars/scripts/check_workflow_classification.py +223 -0
- package/vendor/ars/scripts/chinese_literature_client.py +1938 -0
- package/vendor/ars/scripts/citation_verification_summary.py +85 -0
- package/vendor/ars/scripts/claim_audit_calibration.py +517 -0
- package/vendor/ars/scripts/claim_audit_finalizer.py +456 -0
- package/vendor/ars/scripts/claim_audit_pipeline.py +1594 -0
- package/vendor/ars/scripts/claim_registry_coverage.py +493 -0
- package/vendor/ars/scripts/claim_standing_discovery.py +784 -0
- package/vendor/ars/scripts/claim_standing_stance_runner.py +758 -0
- package/vendor/ars/scripts/claim_standing_stance_scorer.py +239 -0
- package/vendor/ars/scripts/claim_strength_drift_disposition.py +666 -0
- package/vendor/ars/scripts/contamination_signals.py +689 -0
- package/vendor/ars/scripts/corpus_consumer_manifest.json +19 -0
- package/vendor/ars/scripts/cross_model_codex_transport.py +1374 -0
- package/vendor/ars/scripts/cross_model_codex_verify.sh +6 -0
- package/vendor/ars/scripts/cross_model_handoff.py +359 -0
- package/vendor/ars/scripts/cross_model_smoke_test.sh +183 -0
- package/vendor/ars/scripts/cross_model_smoke_test_codex.sh +35 -0
- package/vendor/ars/scripts/cross_model_verification/gemini_is_grounded.jq +45 -0
- package/vendor/ars/scripts/cross_model_verification/gemini_sources.jq +45 -0
- package/vendor/ars/scripts/cross_model_verification/normalize_compat_verdict.py +57 -0
- package/vendor/ars/scripts/cross_model_verification/openai_has_completed_web_search.jq +15 -0
- package/vendor/ars/scripts/cross_model_verification/openai_sources.jq +17 -0
- package/vendor/ars/scripts/cross_model_verification/openai_text.jq +11 -0
- package/vendor/ars/scripts/crossref_client.py +225 -0
- package/vendor/ars/scripts/dispatch_e4_panel.py +2731 -0
- package/vendor/ars/scripts/evidence_rows.py +2043 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/author_stage3.json +32 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/author_stage3_input.json +27 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/author_stage3_prime.json +32 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/author_stage3_prime_input.json +27 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/compliance_override.json +50 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/compliance_override_action.json +14 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/compliance_pass.json +44 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/explicit_user_request_log.json +26 -0
- package/vendor/ars/scripts/fixtures/adjudication_activity/mandatory_checkpoint_log.json +116 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/README.md +56 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a1_pass_with_p1/2026-04-30T15-22-04Z-d8f3.audit_artifact_entry.json +24 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a1_pass_with_p1/2026-04-30T15-22-04Z-d8f3.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a1_pass_with_p1/2026-04-30T15-22-04Z-d8f3.meta.json +43 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a1_pass_with_p1/2026-04-30T15-22-04Z-d8f3.verdict.yaml +19 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/negative/a7_orphan_completion/2026-04-30T15-22-04Z-d8f3.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/persisted_minor/2026-04-30T15-22-04Z-d8f3.audit_artifact_entry.json +26 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/persisted_minor/2026-04-30T15-22-04Z-d8f3.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/persisted_minor/2026-04-30T15-22-04Z-d8f3.meta.json +43 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/persisted_minor/2026-04-30T15-22-04Z-d8f3.verdict.yaml +19 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/proposal_pass/2026-04-30T15-22-04Z-d8f3.audit_artifact_entry.json +24 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/proposal_pass/2026-04-30T15-22-04Z-d8f3.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/proposal_pass/2026-04-30T15-22-04Z-d8f3.meta.json +43 -0
- package/vendor/ars/scripts/fixtures/audit_artifact_consistency/positive/proposal_pass/2026-04-30T15-22-04Z-d8f3.verdict.yaml +12 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/retraction.json +46 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/retraction_check_attestation.json +44 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/tortured_phrase.json +44 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/tortured_phrase_v1_2_abstract_missing.json +107 -0
- package/vendor/ars/scripts/fixtures/bibliographic_integrity_signals/tortured_phrase_v1_2_detected.json +124 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/expected_outcomes.json +77 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/manifest.yaml +37 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/tuples/001-valid-doi-test.json +20 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/tuples/002-valid-arxiv-test.json +19 -0
- package/vendor/ars/scripts/fixtures/check_evals_gold_set/clean/tuples/003-fabricated-test.json +20 -0
- package/vendor/ars/scripts/fixtures/claim_audit_calibration/gold_set.json +344 -0
- package/vendor/ars/scripts/fixtures/claim_standing_candidate_ledger/query_plan.json +108 -0
- package/vendor/ars/scripts/fixtures/claim_standing_candidate_ledger/retrieval_input.json +179 -0
- package/vendor/ars/scripts/fixtures/committee_correspondence/16fd83f6aec7/concern_tracker.json +129 -0
- package/vendor/ars/scripts/fixtures/committee_correspondence/16fd83f6aec7/response_skeleton.md +19 -0
- package/vendor/ars/scripts/fixtures/committee_correspondence/16fd83f6aec7/source_letter.txt +9 -0
- package/vendor/ars/scripts/fixtures/content_coverage_advisory/base_draft.json +48 -0
- package/vendor/ars/scripts/fixtures/content_coverage_advisory/base_inventory.json +38 -0
- package/vendor/ars/scripts/fixtures/content_coverage_advisory/packet/consent.txt +1 -0
- package/vendor/ars/scripts/fixtures/content_coverage_advisory/session_sources.json +3 -0
- package/vendor/ars/scripts/fixtures/cross_document_consistency/README.md +6 -0
- package/vendor/ars/scripts/fixtures/cross_document_consistency/accepted_draft.md +35 -0
- package/vendor/ars/scripts/fixtures/cross_document_consistency/cases.json +75 -0
- package/vendor/ars/scripts/fixtures/cross_document_consistency/preregistration.md +5 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/forbidden_event.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/grounded_verified.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/malformed.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/missing_search.jsonl +2 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/multiple_finals.jsonl +4 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/not_found.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/unbound_source.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/cross_model_codex_transport/wrong_search_shape.jsonl +3 -0
- package/vendor/ars/scripts/fixtures/evidence_rows/phase_e_inputs.json +114 -0
- package/vendor/ars/scripts/fixtures/evidence_rows/session_sources.json +5 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/cross-border-us-tw-gdpr.json +71 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/gdpr-member-state-unresolved.json +62 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/missing-data-axis.json +45 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/no-profile.json +33 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/tw-gdpr-two-axis.json +74 -0
- package/vendor/ars/scripts/fixtures/human_subjects_authority/us-gdpr-two-axis.json +74 -0
- package/vendor/ars/scripts/fixtures/review_pathway_rule_trace/lint-near-misses.json +72 -0
- package/vendor/ars/scripts/fixtures/review_pathway_rule_trace/no-profile-request.json +18 -0
- package/vendor/ars/scripts/fixtures/review_pathway_rule_trace/tw-candidates-request.json +63 -0
- package/vendor/ars/scripts/fixtures/review_pathway_rule_trace/us-candidates-request.json +77 -0
- package/vendor/ars/scripts/fixtures/review_target_context/exact-declaration.json +24 -0
- package/vendor/ars/scripts/fixtures/review_target_context/field-general-declaration.json +24 -0
- package/vendor/ars/scripts/fixtures/review_target_context/msr-2027-technical-full-declaration.json +24 -0
- package/vendor/ars/scripts/fixtures/review_target_context/synthetic-registry.json +92 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/README.md +21 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/subject_context_attested_only.json +55 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/subject_context_machine_supported.json +49 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/subject_context_not_isolated.json +56 -0
- package/vendor/ars/scripts/fixtures/revision_claim_drift_v2/subject_context_unknown.json +49 -0
- package/vendor/ars/scripts/fixtures/submission_package/clean/paper.md +16 -0
- package/vendor/ars/scripts/fixtures/submission_package/clean/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/fallback_authoryear/paper.md +11 -0
- package/vendor/ars/scripts/fixtures/submission_package/fallback_authoryear/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/fallback_latex/paper.tex +9 -0
- package/vendor/ars/scripts/fixtures/submission_package/fallback_latex/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/marker_no_join/paper.md +7 -0
- package/vendor/ars/scripts/fixtures/submission_package/orphan_intext/paper.md +8 -0
- package/vendor/ars/scripts/fixtures/submission_package/orphan_intext/references.bib +6 -0
- package/vendor/ars/scripts/fixtures/submission_package/passports/corpus_only.yaml +9 -0
- package/vendor/ars/scripts/fixtures/submission_package/passports/summary_join.yaml +16 -0
- package/vendor/ars/scripts/fixtures/submission_package/profiles/full.yaml +15 -0
- package/vendor/ars/scripts/fixtures/submission_package/profiles/tight.yaml +15 -0
- package/vendor/ars/scripts/fixtures/submission_package/summary_join/paper.md +7 -0
- package/vendor/ars/scripts/fixtures/submission_package/uncited_reference/paper.md +9 -0
- package/vendor/ars/scripts/fixtures/submission_package/uncited_reference/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/venue_clean/paper.md +26 -0
- package/vendor/ars/scripts/fixtures/submission_package/venue_clean/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_package/venue_violations/paper.md +20 -0
- package/vendor/ars/scripts/fixtures/submission_package/venue_violations/references.bib +13 -0
- package/vendor/ars/scripts/fixtures/submission_packet_manifest/base_inventory.json +101 -0
- package/vendor/ars/scripts/fixtures/submission_packet_manifest/packet/consent-materials.txt +3 -0
- package/vendor/ars/scripts/fixtures/submission_packet_manifest/packet/training-certificate.txt +2 -0
- package/vendor/ars/scripts/fixtures/submission_packet_manifest/packet/tw-consent-materials.txt +3 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/corpus_input.yaml +30 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/own_draft.md +36 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/own_draft.tex +21 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/seed_expectations.json +218 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/snapshot.json +164 -0
- package/vendor/ars/scripts/fixtures/tortured_phrase_screening/snapshot_manifest.json +29 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/README.md +55 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/arxiv/empty_feed.xml +10 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/arxiv/error_5xx.html +7 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/arxiv/id_hit.xml +26 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/README.md +69 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/cnki_landing_page.html +13 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/error_5xx.html +2 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coordinate_ambiguous.json +16 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coordinate_hit.json +16 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coordinate_zero.json +14 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coverage_hit.json +15 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esearch_coverage_zero.json +13 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_hit.json +43 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_issn_mismatch.json +31 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_no_doi.json +31 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_unknown_ra.json +34 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/esummary_year_mismatch.json +31 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/handle_absent.json +4 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/handle_exists.json +16 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/handle_internal_error.json +4 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/istic_csl_hit.json +25 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/istic_csl_other_title.json +18 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/ra_cnki.json +6 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/ra_crossref.json +6 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/ra_istic.json +6 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/chinese_literature/ra_unknown_prefix.json +6 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/crossref/doi_hit.json +24 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/crossref/error_5xx.html +7 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/crossref/title_search_miss.json +15 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/openalex/doi_hit.json +29 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/openalex/error_5xx.json +4 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/openalex/title_search_miss.json +11 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/semantic_scholar/doi_hit.json +14 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/semantic_scholar/error_5xx.json +3 -0
- package/vendor/ars/scripts/fixtures/transport_bodies/semantic_scholar/title_search_miss.json +5 -0
- package/vendor/ars/scripts/human_read_attestation_resolver.py +467 -0
- package/vendor/ars/scripts/ideation_diversity_assignment_gate.py +430 -0
- package/vendor/ars/scripts/inquiry_branch_ledger.py +2540 -0
- package/vendor/ars/scripts/legacy/ars_apply_revision_patch_v1_0.py +715 -0
- package/vendor/ars/scripts/legacy/check_re_review_synthesis_v1_0.py +2215 -0
- package/vendor/ars/scripts/migrate_literature_corpus_to_v3_10.py +223 -0
- package/vendor/ars/scripts/migrate_literature_corpus_to_v3_7_3.py +277 -0
- package/vendor/ars/scripts/migrate_literature_corpus_to_v3_9_0.py +304 -0
- package/vendor/ars/scripts/model_tiering_manifest.json +46 -0
- package/vendor/ars/scripts/openalex_client.py +232 -0
- package/vendor/ars/scripts/parse_audit_verdict.py +802 -0
- package/vendor/ars/scripts/pdf_content_classifier_worker.py +176 -0
- package/vendor/ars/scripts/pdf_read_preflight.py +1455 -0
- package/vendor/ars/scripts/policy_anchor_disclosure_referee.py +354 -0
- package/vendor/ars/scripts/recompute_receipts.py +1414 -0
- package/vendor/ars/scripts/render_claim_standing_view.py +374 -0
- package/vendor/ars/scripts/render_eval_comment.py +130 -0
- package/vendor/ars/scripts/render_harness_retirement_issue.py +167 -0
- package/vendor/ars/scripts/repro_lock_validation.py +90 -0
- package/vendor/ars/scripts/research_workflow_profile.py +1079 -0
- package/vendor/ars/scripts/resolve_human_subjects_authority.py +1158 -0
- package/vendor/ars/scripts/resolve_review_target_context.py +683 -0
- package/vendor/ars/scripts/resume_e4_record.py +509 -0
- package/vendor/ars/scripts/retraction_status.py +484 -0
- package/vendor/ars/scripts/review_criteria_binding.py +889 -0
- package/vendor/ars/scripts/review_panel_provenance.py +744 -0
- package/vendor/ars/scripts/revision_roadmap.py +1967 -0
- package/vendor/ars/scripts/run_ci_pytest_manifest.py +116 -0
- package/vendor/ars/scripts/run_codex_audit.sh +1191 -0
- package/vendor/ars/scripts/run_evals.py +513 -0
- package/vendor/ars/scripts/run_ideation_diversity_no_call.py +3505 -0
- package/vendor/ars/scripts/run_indirect_prompt_injection_no_call.py +3330 -0
- package/vendor/ars/scripts/run_indirect_prompt_injection_probe.py +399 -0
- package/vendor/ars/scripts/run_review_criteria_constructive_value.py +1895 -0
- package/vendor/ars/scripts/run_role_topology_utility_dry_run.py +606 -0
- package/vendor/ars/scripts/score_review_criteria_constructive_value.py +617 -0
- package/vendor/ars/scripts/semantic_scholar_client.py +291 -0
- package/vendor/ars/scripts/slr_lineage.py +59 -0
- package/vendor/ars/scripts/sync_adapter_docs.py +118 -0
- package/vendor/ars/scripts/temporal_integrity_audit.py +840 -0
- package/vendor/ars/scripts/test_431_exact_or_bust.py +253 -0
- package/vendor/ars/scripts/test__eval_threshold_gate.py +125 -0
- package/vendor/ars/scripts/test__markdown_lint_util.py +129 -0
- package/vendor/ars/scripts/test__next_verified_at_ms.py +256 -0
- package/vendor/ars/scripts/test_adjacent_framing_probe_lint.py +171 -0
- package/vendor/ars/scripts/test_adjudication_activity.py +1515 -0
- package/vendor/ars/scripts/test_ars_anchorize_draft.py +178 -0
- package/vendor/ars/scripts/test_ars_apply_revision_patch.py +1335 -0
- package/vendor/ars/scripts/test_ars_cache_invalidate.py +51 -0
- package/vendor/ars/scripts/test_ars_mark_read.py +910 -0
- package/vendor/ars/scripts/test_ars_update_check.py +816 -0
- package/vendor/ars/scripts/test_ars_write_scope_guard.py +790 -0
- package/vendor/ars/scripts/test_arxiv_client.py +374 -0
- package/vendor/ars/scripts/test_audit_schemas.py +560 -0
- package/vendor/ars/scripts/test_audit_snapshot_render_section_0.py +105 -0
- package/vendor/ars/scripts/test_block_parser.py +259 -0
- package/vendor/ars/scripts/test_bootstrap_timeline_yaml.py +148 -0
- package/vendor/ars/scripts/test_build_claim_standing_candidate_ledger.py +1203 -0
- package/vendor/ars/scripts/test_build_claim_standing_query_plan.py +791 -0
- package/vendor/ars/scripts/test_build_submission_packet_manifest.py +2644 -0
- package/vendor/ars/scripts/test_check_215_field_norm.py +238 -0
- package/vendor/ars/scripts/test_check_216_surface_form.py +341 -0
- package/vendor/ars/scripts/test_check_268_nested_commitment_ledger.py +194 -0
- package/vendor/ars/scripts/test_check_390_revision_patch_discipline.py +279 -0
- package/vendor/ars/scripts/test_check_392_citation_verification_intake.py +144 -0
- package/vendor/ars/scripts/test_check_394_submission_policy.py +200 -0
- package/vendor/ars/scripts/test_check_439_format_profile.py +252 -0
- package/vendor/ars/scripts/test_check_619_disclosure_closeout.py +158 -0
- package/vendor/ars/scripts/test_check_630_codex_subscription_transport.py +245 -0
- package/vendor/ars/scripts/test_check_669_review_pathway_rule_trace.py +304 -0
- package/vendor/ars/scripts/test_check_670_revision_roadmap_integration.py +260 -0
- package/vendor/ars/scripts/test_check_673_adjudication_activity.py +367 -0
- package/vendor/ars/scripts/test_check_684_review_criteria_binding.py +274 -0
- package/vendor/ars/scripts/test_check_agents_mirror_sync.py +137 -0
- package/vendor/ars/scripts/test_check_audit_artifact_consistency.py +2133 -0
- package/vendor/ars/scripts/test_check_benchmark_report.py +117 -0
- package/vendor/ars/scripts/test_check_bibliographic_integrity_signals.py +609 -0
- package/vendor/ars/scripts/test_check_calibration_tiers.py +376 -0
- package/vendor/ars/scripts/test_check_changelog_covers_merges.py +509 -0
- package/vendor/ars/scripts/test_check_ci_pytest_manifest.py +425 -0
- package/vendor/ars/scripts/test_check_claim_standing_candidate_ledger_integration.py +256 -0
- package/vendor/ars/scripts/test_check_claim_standing_freshness.py +277 -0
- package/vendor/ars/scripts/test_check_collaboration_depth_rubric.py +239 -0
- package/vendor/ars/scripts/test_check_command_frontmatter_name.py +178 -0
- package/vendor/ars/scripts/test_check_committee_correspondence.py +298 -0
- package/vendor/ars/scripts/test_check_compliance_report.py +381 -0
- package/vendor/ars/scripts/test_check_content_coverage_advisory_integration.py +308 -0
- package/vendor/ars/scripts/test_check_control_availability.py +361 -0
- package/vendor/ars/scripts/test_check_cross_document_consistency_advisory_integration.py +698 -0
- package/vendor/ars/scripts/test_check_cross_model_handoff_contract.py +301 -0
- package/vendor/ars/scripts/test_check_cross_model_verification_sync.py +203 -0
- package/vendor/ars/scripts/test_check_data_access_level.py +227 -0
- package/vendor/ars/scripts/test_check_data_flows.py +382 -0
- package/vendor/ars/scripts/test_check_decision_contract.py +387 -0
- package/vendor/ars/scripts/test_check_degradation_registry.py +270 -0
- package/vendor/ars/scripts/test_check_distribution_surface_claims.py +225 -0
- package/vendor/ars/scripts/test_check_domain_evidence_profile.py +439 -0
- package/vendor/ars/scripts/test_check_e4_promotion.py +163 -0
- package/vendor/ars/scripts/test_check_evals_gold_set.py +312 -0
- package/vendor/ars/scripts/test_check_evidence_row_integration.py +187 -0
- package/vendor/ars/scripts/test_check_field_norm_severity.py +173 -0
- package/vendor/ars/scripts/test_check_firm_rules_sync.py +342 -0
- package/vendor/ars/scripts/test_check_heldout_measurement_report.py +1508 -0
- package/vendor/ars/scripts/test_check_human_subjects_output_contract.py +129 -0
- package/vendor/ars/scripts/test_check_human_subjects_reference_migration.py +756 -0
- package/vendor/ars/scripts/test_check_instruction_data_boundary.py +204 -0
- package/vendor/ars/scripts/test_check_judge_prompt_version.py +90 -0
- package/vendor/ars/scripts/test_check_model_tiering.py +236 -0
- package/vendor/ars/scripts/test_check_panel_synthesis.py +1658 -0
- package/vendor/ars/scripts/test_check_passport_reset_contract.py +249 -0
- package/vendor/ars/scripts/test_check_pattern_eval_manifest.py +381 -0
- package/vendor/ars/scripts/test_check_persuasion_invariance_fixtures.py +591 -0
- package/vendor/ars/scripts/test_check_phase_conformance.py +4366 -0
- package/vendor/ars/scripts/test_check_pipeline_boundary_semantics.py +931 -0
- package/vendor/ars/scripts/test_check_pipeline_integrity.py +243 -0
- package/vendor/ars/scripts/test_check_policy_anchor_protocol.py +236 -0
- package/vendor/ars/scripts/test_check_policy_anchor_table.py +295 -0
- package/vendor/ars/scripts/test_check_prisma_trAIce_freshness.py +68 -0
- package/vendor/ars/scripts/test_check_promotion_bakeoff_preregistration.py +799 -0
- package/vendor/ars/scripts/test_check_ranking_lift.py +377 -0
- package/vendor/ars/scripts/test_check_re_review_synthesis.py +3398 -0
- package/vendor/ars/scripts/test_check_receipt_enum_sync.py +176 -0
- package/vendor/ars/scripts/test_check_repro_lock.py +107 -0
- package/vendor/ars/scripts/test_check_reviewer_data_fences.py +334 -0
- package/vendor/ars/scripts/test_check_reviewer_finding_contract.py +1107 -0
- package/vendor/ars/scripts/test_check_reviewer_role_label.py +491 -0
- package/vendor/ars/scripts/test_check_reviewer_scoring_honesty.py +222 -0
- package/vendor/ars/scripts/test_check_reviewer_sprint_prompt_sync.py +373 -0
- package/vendor/ars/scripts/test_check_revision_claim_drift_suite_v2.py +1925 -0
- package/vendor/ars/scripts/test_check_revision_token_conservation.py +398 -0
- package/vendor/ars/scripts/test_check_risk_register.py +336 -0
- package/vendor/ars/scripts/test_check_role_scoped_contract.py +1104 -0
- package/vendor/ars/scripts/test_check_rq_framing_patterns.py +110 -0
- package/vendor/ars/scripts/test_check_rubric_weight_consistency.py +32 -0
- package/vendor/ars/scripts/test_check_seeded_defect_fixtures.py +392 -0
- package/vendor/ars/scripts/test_check_setup_cross_model_parity.py +121 -0
- package/vendor/ars/scripts/test_check_spec_consistency.py +1081 -0
- package/vendor/ars/scripts/test_check_sprint_contract.py +458 -0
- package/vendor/ars/scripts/test_check_stage_capability_matrix.py +698 -0
- package/vendor/ars/scripts/test_check_submission_packet_manifest_integration.py +177 -0
- package/vendor/ars/scripts/test_check_surface_form_parity.py +417 -0
- package/vendor/ars/scripts/test_check_task_type.py +116 -0
- package/vendor/ars/scripts/test_check_tools_allowlist.py +835 -0
- package/vendor/ars/scripts/test_check_tortured_phrase_screening_integration.py +1306 -0
- package/vendor/ars/scripts/test_check_v3_10_134_write_scope.py +251 -0
- package/vendor/ars/scripts/test_check_v3_10_policy.py +547 -0
- package/vendor/ars/scripts/test_check_v3_6_7_pattern_protection.py +960 -0
- package/vendor/ars/scripts/test_check_v3_6_8_audit_scope_block.py +1000 -0
- package/vendor/ars/scripts/test_check_v3_6_8_cite_provenance_pipeline.py +454 -0
- package/vendor/ars/scripts/test_check_v3_6_8_frontmatter_trust_schema.py +581 -0
- package/vendor/ars/scripts/test_check_v3_6_8_mark_read_commands.py +120 -0
- package/vendor/ars/scripts/test_check_v3_6_8_pattern_protection.py +1138 -0
- package/vendor/ars/scripts/test_check_v3_7_3_three_layer_citation.py +566 -0
- package/vendor/ars/scripts/test_check_v3_8_annotation_literal_sync.py +262 -0
- package/vendor/ars/scripts/test_check_v3_9_0_triangulation.py +321 -0
- package/vendor/ars/scripts/test_check_v3_9_2_phase_boundary.py +190 -0
- package/vendor/ars/scripts/test_check_v3_9_4_temporal_verification.py +471 -0
- package/vendor/ars/scripts/test_check_version_consistency.py +1462 -0
- package/vendor/ars/scripts/test_check_workflow_classification.py +225 -0
- package/vendor/ars/scripts/test_chinese_literature_client.py +1889 -0
- package/vendor/ars/scripts/test_citation_existence_policy.py +480 -0
- package/vendor/ars/scripts/test_citation_verification_summary.py +342 -0
- package/vendor/ars/scripts/test_claim_audit_calibration.py +882 -0
- package/vendor/ars/scripts/test_claim_audit_finalizer.py +979 -0
- package/vendor/ars/scripts/test_claim_audit_pipeline.py +2398 -0
- package/vendor/ars/scripts/test_claim_audit_schema.py +1778 -0
- package/vendor/ars/scripts/test_claim_intent_manifest.py +666 -0
- package/vendor/ars/scripts/test_claim_registry_coverage.py +246 -0
- package/vendor/ars/scripts/test_claim_standing_discovery.py +579 -0
- package/vendor/ars/scripts/test_claim_standing_pipeline_wiring.py +290 -0
- package/vendor/ars/scripts/test_claim_standing_stance_assets.py +399 -0
- package/vendor/ars/scripts/test_claim_standing_stance_contracts.py +383 -0
- package/vendor/ars/scripts/test_claim_standing_stance_runner.py +349 -0
- package/vendor/ars/scripts/test_claim_standing_transmissions.py +605 -0
- package/vendor/ars/scripts/test_claim_strength_drift_disposition.py +517 -0
- package/vendor/ars/scripts/test_claim_verification_coverage_contract.py +104 -0
- package/vendor/ars/scripts/test_contamination_signals.py +1086 -0
- package/vendor/ars/scripts/test_content_coverage_advisory.py +1767 -0
- package/vendor/ars/scripts/test_cross_document_consistency_advisory.py +1270 -0
- package/vendor/ars/scripts/test_cross_model_codex_transport.py +1152 -0
- package/vendor/ars/scripts/test_cross_model_handoff.py +571 -0
- package/vendor/ars/scripts/test_cross_model_verification_guards.py +792 -0
- package/vendor/ars/scripts/test_crossref_client.py +393 -0
- package/vendor/ars/scripts/test_dispatch_e4_panel.py +4235 -0
- package/vendor/ars/scripts/test_e2e_claim_audit.py +540 -0
- package/vendor/ars/scripts/test_eval_harness_workflow.py +140 -0
- package/vendor/ars/scripts/test_evals_citation_extraction.py +150 -0
- package/vendor/ars/scripts/test_evals_lift_report_schema.py +108 -0
- package/vendor/ars/scripts/test_evidence_rows.py +2593 -0
- package/vendor/ars/scripts/test_experiment_provenance.py +915 -0
- package/vendor/ars/scripts/test_human_read_attestation_resolver.py +477 -0
- package/vendor/ars/scripts/test_ideation_diversity_assignment_gate.py +615 -0
- package/vendor/ars/scripts/test_indirect_prompt_injection_behavior_probe.py +250 -0
- package/vendor/ars/scripts/test_inquiry_branch_ledger.py +2296 -0
- package/vendor/ars/scripts/test_migrate_literature_corpus_to_v3_10.py +248 -0
- package/vendor/ars/scripts/test_migrate_literature_corpus_to_v3_7_3.py +545 -0
- package/vendor/ars/scripts/test_migrate_literature_corpus_to_v3_9_0.py +497 -0
- package/vendor/ars/scripts/test_normalize_compat_verdict.py +149 -0
- package/vendor/ars/scripts/test_openalex_client.py +490 -0
- package/vendor/ars/scripts/test_passport_yaml.py +104 -0
- package/vendor/ars/scripts/test_pattern_eval_runtime.py +1295 -0
- package/vendor/ars/scripts/test_pdf_read_preflight.py +1943 -0
- package/vendor/ars/scripts/test_policy_anchor_disclosure.py +666 -0
- package/vendor/ars/scripts/test_reading_probe_lint.py +218 -0
- package/vendor/ars/scripts/test_recompute_receipts.py +778 -0
- package/vendor/ars/scripts/test_render_claim_standing_view.py +192 -0
- package/vendor/ars/scripts/test_render_eval_comment.py +162 -0
- package/vendor/ars/scripts/test_render_harness_retirement_issue.py +110 -0
- package/vendor/ars/scripts/test_repro_lock_validation_drift.py +100 -0
- package/vendor/ars/scripts/test_research_workflow_profile.py +734 -0
- package/vendor/ars/scripts/test_resolve_human_subjects_authority.py +1219 -0
- package/vendor/ars/scripts/test_resolve_review_target_context.py +703 -0
- package/vendor/ars/scripts/test_resume_e4_record.py +315 -0
- package/vendor/ars/scripts/test_retraction_status.py +456 -0
- package/vendor/ars/scripts/test_review_criteria_binding.py +629 -0
- package/vendor/ars/scripts/test_review_panel_provenance.py +565 -0
- package/vendor/ars/scripts/test_review_pathway_rule_trace.py +821 -0
- package/vendor/ars/scripts/test_revision_roadmap.py +1255 -0
- package/vendor/ars/scripts/test_run_ci_pytest_manifest.py +186 -0
- package/vendor/ars/scripts/test_run_codex_audit_e2e.py +369 -0
- package/vendor/ars/scripts/test_run_evals.py +430 -0
- package/vendor/ars/scripts/test_run_guard_launcher.py +500 -0
- package/vendor/ars/scripts/test_run_ideation_diversity_no_call.py +1833 -0
- package/vendor/ars/scripts/test_run_indirect_prompt_injection_no_call.py +1889 -0
- package/vendor/ars/scripts/test_run_review_criteria_constructive_value.py +586 -0
- package/vendor/ars/scripts/test_run_role_topology_utility_dry_run.py +428 -0
- package/vendor/ars/scripts/test_score_review_criteria_constructive_value.py +340 -0
- package/vendor/ars/scripts/test_semantic_scholar_client.py +554 -0
- package/vendor/ars/scripts/test_slr_lineage_emission.py +230 -0
- package/vendor/ars/scripts/test_socratic_rq_non_generation_contract.py +173 -0
- package/vendor/ars/scripts/test_temporal_integrity_audit.py +438 -0
- package/vendor/ars/scripts/test_text_similarity.py +95 -0
- package/vendor/ars/scripts/test_title_fuzzy_false_positive.py +111 -0
- package/vendor/ars/scripts/test_tortured_phrase_screening.py +2959 -0
- package/vendor/ars/scripts/test_transport_fixture_citation_gate.py +338 -0
- package/vendor/ars/scripts/test_uncited_assertion.py +558 -0
- package/vendor/ars/scripts/test_v3_6_7_phase_6_6.py +1279 -0
- package/vendor/ars/scripts/test_validate_compliance_fixtures.py +36 -0
- package/vendor/ars/scripts/test_validate_ideation_diversity_assets.py +230 -0
- package/vendor/ars/scripts/test_venue_disclosure_contract.py +755 -0
- package/vendor/ars/scripts/test_verification_cache.py +280 -0
- package/vendor/ars/scripts/test_verification_gate.py +461 -0
- package/vendor/ars/scripts/test_verify_passport_cli.py +123 -0
- package/vendor/ars/scripts/test_verify_submission_package.py +1407 -0
- package/vendor/ars/scripts/test_version_records_schema.py +211 -0
- package/vendor/ars/scripts/tortured_phrase_screening.py +3502 -0
- package/vendor/ars/scripts/uncited_assertion_detector.py +254 -0
- package/vendor/ars/scripts/v3_6_7_inversion_manifest.json +9 -0
- package/vendor/ars/scripts/v3_6_8_inversion_manifest.json +10 -0
- package/vendor/ars/scripts/validate_claim_standing_stance_assets.py +249 -0
- package/vendor/ars/scripts/validate_compliance_fixtures.py +56 -0
- package/vendor/ars/scripts/validate_ideation_diversity_assets.py +303 -0
- package/vendor/ars/scripts/venue_disclosure_contract_harness.py +837 -0
- package/vendor/ars/scripts/verification_cache.py +276 -0
- package/vendor/ars/scripts/verification_gate/__init__.py +345 -0
- package/vendor/ars/scripts/verify_passport.py +133 -0
- package/vendor/ars/scripts/verify_submission_package.py +1657 -0
- package/vendor/ars/shared/agents/compliance_agent.md +136 -0
- package/vendor/ars/shared/artifact_reproducibility_pattern.md +173 -0
- package/vendor/ars/shared/benchmark_report.schema.json +81 -0
- package/vendor/ars/shared/benchmark_report_pattern.md +180 -0
- package/vendor/ars/shared/bibliographic_integrity_signals.md +142 -0
- package/vendor/ars/shared/collaboration_depth_rubric.md +154 -0
- package/vendor/ars/shared/compliance_checkpoint_protocol.md +162 -0
- package/vendor/ars/shared/compliance_report.schema.json +187 -0
- package/vendor/ars/shared/contracts/README.md +938 -0
- package/vendor/ars/shared/contracts/activity/adjudication_activity_input.schema.json +555 -0
- package/vendor/ars/shared/contracts/activity/adjudication_activity_store.schema.json +560 -0
- package/vendor/ars/shared/contracts/audit/audit_jsonl.schema.json +128 -0
- package/vendor/ars/shared/contracts/audit/audit_sidecar.schema.json +169 -0
- package/vendor/ars/shared/contracts/audit/audit_verdict.schema.json +133 -0
- package/vendor/ars/shared/contracts/audit/cross_document_consistency_advisory.schema.json +480 -0
- package/vendor/ars/shared/contracts/audit/cross_document_consistency_advisory_draft.schema.json +564 -0
- package/vendor/ars/shared/contracts/audit/cross_document_source_manifest.schema.json +202 -0
- package/vendor/ars/shared/contracts/audit/tortured_phrase_advisory.schema.json +1362 -0
- package/vendor/ars/shared/contracts/audit/tortured_phrase_snapshot.schema.json +208 -0
- package/vendor/ars/shared/contracts/audit/tortured_phrase_snapshot_manifest.schema.json +335 -0
- package/vendor/ars/shared/contracts/capability/stage_capability_matrix.json +434 -0
- package/vendor/ars/shared/contracts/claim_standing/candidate_ledger.schema.json +705 -0
- package/vendor/ars/shared/contracts/claim_standing/query_plan.schema.json +389 -0
- package/vendor/ars/shared/contracts/claim_standing/query_plan_v1_1.schema.json +782 -0
- package/vendor/ars/shared/contracts/claim_standing/retrieval_input.schema.json +440 -0
- package/vendor/ars/shared/contracts/claim_standing/stance_record.schema.json +460 -0
- package/vendor/ars/shared/contracts/claim_standing/transmission_ledger.schema.json +282 -0
- package/vendor/ars/shared/contracts/cross_model/codex_citation_receipt.schema.json +157 -0
- package/vendor/ars/shared/contracts/cross_model/codex_citation_request.schema.json +23 -0
- package/vendor/ars/shared/contracts/cross_model/promotion_bakeoff_sealed_commitment.schema.json +55 -0
- package/vendor/ars/shared/contracts/cross_model/promotion_bakeoff_sealed_reveal.schema.json +50 -0
- package/vendor/ars/shared/contracts/degradation_registry.json +428 -0
- package/vendor/ars/shared/contracts/evaluator/full.json +126 -0
- package/vendor/ars/shared/contracts/evidence/claim_registry.schema.json +50 -0
- package/vendor/ars/shared/contracts/evidence/claim_registry_coverage_report.schema.json +79 -0
- package/vendor/ars/shared/contracts/evidence/evidence_row.schema.json +504 -0
- package/vendor/ars/shared/contracts/evidence/evidence_row_v1_1.schema.json +364 -0
- package/vendor/ars/shared/contracts/evidence/evidence_row_v1_2.schema.json +714 -0
- package/vendor/ars/shared/contracts/evidence/evidence_row_v1_3.schema.json +524 -0
- package/vendor/ars/shared/contracts/human_subjects/authority_profile_registry.schema.json +497 -0
- package/vendor/ars/shared/contracts/human_subjects/committee_correspondence.schema.json +253 -0
- package/vendor/ars/shared/contracts/human_subjects/content_coverage_advisory.schema.json +620 -0
- package/vendor/ars/shared/contracts/human_subjects/irb_context_record.schema.json +329 -0
- package/vendor/ars/shared/contracts/human_subjects/resolved_authority_context.schema.json +347 -0
- package/vendor/ars/shared/contracts/human_subjects/review_pathway_rule_trace.schema.json +265 -0
- package/vendor/ars/shared/contracts/human_subjects/review_pathway_trace_request.schema.json +127 -0
- package/vendor/ars/shared/contracts/human_subjects/submission_packet_inventory.schema.json +240 -0
- package/vendor/ars/shared/contracts/human_subjects/submission_packet_manifest.schema.json +999 -0
- package/vendor/ars/shared/contracts/passport/audit_artifact_entry.schema.json +266 -0
- package/vendor/ars/shared/contracts/passport/bibliographic_integrity_signal.schema.json +1676 -0
- package/vendor/ars/shared/contracts/passport/citation_provenance.schema.json +107 -0
- package/vendor/ars/shared/contracts/passport/citation_verification_summary.schema.json +164 -0
- package/vendor/ars/shared/contracts/passport/claim_audit_result.schema.json +124 -0
- package/vendor/ars/shared/contracts/passport/claim_drift.schema.json +58 -0
- package/vendor/ars/shared/contracts/passport/claim_intent_manifest.schema.json +107 -0
- package/vendor/ars/shared/contracts/passport/constraint_violation.schema.json +65 -0
- package/vendor/ars/shared/contracts/passport/experiment_alignment_result.schema.json +69 -0
- package/vendor/ars/shared/contracts/passport/experiment_provenance_entry.schema.json +169 -0
- package/vendor/ars/shared/contracts/passport/human_read_log.schema.json +86 -0
- package/vendor/ars/shared/contracts/passport/inquiry_ledger_ref.schema.json +22 -0
- package/vendor/ars/shared/contracts/passport/literature_corpus_entry.schema.json +650 -0
- package/vendor/ars/shared/contracts/passport/preregistration_artifact.schema.json +132 -0
- package/vendor/ars/shared/contracts/passport/rejection_log.schema.json +89 -0
- package/vendor/ars/shared/contracts/passport/reset_ledger_entry.schema.json +158 -0
- package/vendor/ars/shared/contracts/passport/temporal_audit_results.schema.json +208 -0
- package/vendor/ars/shared/contracts/passport/terminal_policies.schema.json +50 -0
- package/vendor/ars/shared/contracts/passport/timeline.schema.json +102 -0
- package/vendor/ars/shared/contracts/passport/uncited_assertion.schema.json +56 -0
- package/vendor/ars/shared/contracts/passport/uncited_audit_failure.schema.json +72 -0
- package/vendor/ars/shared/contracts/passport/user_attested_read_resolution.schema.json +87 -0
- package/vendor/ars/shared/contracts/passport/version_records.schema.json +138 -0
- package/vendor/ars/shared/contracts/patch/block_manifest.schema.json +45 -0
- package/vendor/ars/shared/contracts/patch/legacy/v1_0/revision_patch.schema.json +110 -0
- package/vendor/ars/shared/contracts/patch/revision_patch.schema.json +250 -0
- package/vendor/ars/shared/contracts/pdf/pdf_content_classifier_diagnostic.schema.json +39 -0
- package/vendor/ars/shared/contracts/pdf/pdf_content_classifier_worker.schema.json +88 -0
- package/vendor/ars/shared/contracts/pdf/pdf_read_preflight.schema.json +227 -0
- package/vendor/ars/shared/contracts/re_review/input_manifest.schema.json +161 -0
- package/vendor/ars/shared/contracts/re_review/legacy/v1_0/input_manifest.schema.json +134 -0
- package/vendor/ars/shared/contracts/re_review/legacy/v1_0/precommitment.schema.json +193 -0
- package/vendor/ars/shared/contracts/re_review/legacy/v1_0/traceability.schema.json +841 -0
- package/vendor/ars/shared/contracts/re_review/legacy/v1_0/verdict_record.schema.json +244 -0
- package/vendor/ars/shared/contracts/re_review/precommitment.schema.json +193 -0
- package/vendor/ars/shared/contracts/re_review/traceability.schema.json +916 -0
- package/vendor/ars/shared/contracts/re_review/verdict_record.schema.json +245 -0
- package/vendor/ars/shared/contracts/research_workflow/inquiry_branch_ledger.schema.json +449 -0
- package/vendor/ars/shared/contracts/research_workflow/research_workflow_profile.schema.json +222 -0
- package/vendor/ars/shared/contracts/research_workflow/research_workflow_profile_selection_receipt.schema.json +111 -0
- package/vendor/ars/shared/contracts/review_target/constructive_review_findings.schema.json +172 -0
- package/vendor/ars/shared/contracts/review_target/criteria_registry.schema.json +97 -0
- package/vendor/ars/shared/contracts/review_target/review_criteria_binding_manifest.schema.json +235 -0
- package/vendor/ars/shared/contracts/review_target/review_criteria_source_receipt.schema.json +158 -0
- package/vendor/ars/shared/contracts/review_target/review_target_context.schema.json +106 -0
- package/vendor/ars/shared/contracts/review_target/review_target_declaration.schema.json +118 -0
- package/vendor/ars/shared/contracts/reviewer/full.json +114 -0
- package/vendor/ars/shared/contracts/reviewer/methodology_focus.json +75 -0
- package/vendor/ars/shared/contracts/reviewer/review_panel_provenance.schema.json +263 -0
- package/vendor/ars/shared/contracts/reviewer/review_panel_provenance_carrier.schema.json +122 -0
- package/vendor/ars/shared/contracts/reviewer/review_panel_provenance_input.schema.json +120 -0
- package/vendor/ars/shared/contracts/revision/author_adjudication.schema.json +251 -0
- package/vendor/ars/shared/contracts/revision/author_adjudication_input.schema.json +25 -0
- package/vendor/ars/shared/contracts/revision/claim_strength_drift_disposition.schema.json +97 -0
- package/vendor/ars/shared/contracts/revision/claim_strength_drift_disposition_input.schema.json +80 -0
- package/vendor/ars/shared/contracts/revision/claim_strength_drift_findings.schema.json +139 -0
- package/vendor/ars/shared/contracts/revision/claim_surface_manifest.schema.json +99 -0
- package/vendor/ars/shared/contracts/revision/integrity_correction_authorization.schema.json +140 -0
- package/vendor/ars/shared/contracts/revision/integrity_correction_authorization_input.schema.json +28 -0
- package/vendor/ars/shared/contracts/revision/integrity_correction_list.schema.json +48 -0
- package/vendor/ars/shared/contracts/revision/integrity_pass_receipt.schema.json +16 -0
- package/vendor/ars/shared/contracts/revision/revision_evidence_bundle.schema.json +134 -0
- package/vendor/ars/shared/contracts/revision/revision_roadmap.schema.json +334 -0
- package/vendor/ars/shared/contracts/submission/format_profile.example.yaml +33 -0
- package/vendor/ars/shared/contracts/submission/format_profile.schema.json +102 -0
- package/vendor/ars/shared/contracts/submission/submission_verification_report.schema.json +233 -0
- package/vendor/ars/shared/contracts/submission/venue_profile.schema.json +114 -0
- package/vendor/ars/shared/contracts/writer/full.json +87 -0
- package/vendor/ars/shared/cross_model_verification.md +714 -0
- package/vendor/ars/shared/evals_lift_report.schema.json +141 -0
- package/vendor/ars/shared/ground_truth_isolation_pattern.md +275 -0
- package/vendor/ars/shared/handoff_schemas.md +1209 -0
- package/vendor/ars/shared/human_subjects_authority_registry.json +1278 -0
- package/vendor/ars/shared/mode_spectrum.md +57 -0
- package/vendor/ars/shared/model_tiering.md +83 -0
- package/vendor/ars/shared/policy_data/nature_policy.md +56 -0
- package/vendor/ars/shared/prisma_trAIce_protocol.md +157 -0
- package/vendor/ars/shared/raise_framework.md +129 -0
- package/vendor/ars/shared/references/authority_content_coverage_advisory_protocol.md +275 -0
- package/vendor/ars/shared/references/claim_standing_candidate_ledger_protocol.md +66 -0
- package/vendor/ars/shared/references/claim_strength_ladder.md +93 -0
- package/vendor/ars/shared/references/cross_document_consistency_advisory_protocol.md +263 -0
- package/vendor/ars/shared/references/evidence_row_protocol.md +260 -0
- package/vendor/ars/shared/references/firm_rules.md +90 -0
- package/vendor/ars/shared/references/human_subjects_authority_protocol.md +274 -0
- package/vendor/ars/shared/references/intent_clarification_protocol.md +168 -0
- package/vendor/ars/shared/references/irb_terminology_glossary.md +229 -0
- package/vendor/ars/shared/references/protected_hedging_phrases.md +118 -0
- package/vendor/ars/shared/references/psychometric_terminology_glossary.md +109 -0
- package/vendor/ars/shared/references/review_criteria_consumer_protocol.md +238 -0
- package/vendor/ars/shared/references/review_pathway_rule_trace_protocol.md +166 -0
- package/vendor/ars/shared/references/submission_packet_manifest_protocol.md +292 -0
- package/vendor/ars/shared/references/word_count_conventions.md +124 -0
- package/vendor/ars/shared/research_workflow_profiles/field_general.json +1 -0
- package/vendor/ars/shared/review_criteria_registry.json +207 -0
- package/vendor/ars/shared/review_criteria_sources/msr-2027-technical-papers.2026-08-24.json +46 -0
- package/vendor/ars/shared/review_criteria_sources/sigsoft-empirical-standards.2026-08-24.json +31 -0
- package/vendor/ars/shared/sprint_contract.schema.json +482 -0
- package/vendor/ars/shared/style_calibration_protocol.md +151 -0
- package/vendor/ars/shared/templates/codex_audit_multifile_template.md +263 -0
- package/vendor/ars/tools/release-discipline/.toolkit-version +1 -0
- package/vendor/ars/tools/release-discipline/README.md +4 -0
- package/vendor/ars/tools/release-discipline/scripts/_release_doc_alignment_schema.py +1011 -0
- package/vendor/ars/tools/release-discipline/scripts/check_command_invariants.py +497 -0
- package/vendor/ars/tools/release-discipline/scripts/check_release_doc_alignment.py +263 -0
- package/vendor/ars/tools/release-discipline/scripts/sync-toolkit.sh +147 -0
- package/vendor/windows/NOTICE.md +12 -0
- package/vendor/windows/arm64/fd.exe +0 -0
- package/vendor/windows/arm64/licenses/fd/LICENSE-APACHE +201 -0
- package/vendor/windows/arm64/licenses/fd/LICENSE-MIT +21 -0
- package/vendor/windows/arm64/licenses/ripgrep/COPYING +3 -0
- package/vendor/windows/arm64/licenses/ripgrep/LICENSE-MIT +21 -0
- package/vendor/windows/arm64/licenses/ripgrep/UNLICENSE +24 -0
- package/vendor/windows/arm64/rg.exe +0 -0
- package/vendor/windows/x64/fd.exe +0 -0
- package/vendor/windows/x64/licenses/fd/LICENSE-APACHE +201 -0
- package/vendor/windows/x64/licenses/fd/LICENSE-MIT +21 -0
- package/vendor/windows/x64/licenses/ripgrep/COPYING +3 -0
- package/vendor/windows/x64/licenses/ripgrep/LICENSE-MIT +21 -0
- package/vendor/windows/x64/licenses/ripgrep/UNLICENSE +24 -0
- package/vendor/windows/x64/rg.exe +0 -0
|
@@ -0,0 +1,1191 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Check the hermetic #672 cross-document advisory integration boundary.
|
|
3
|
+
|
|
4
|
+
Behavioral tests own byte replay and finalization semantics. This guard keeps
|
|
5
|
+
the independently editable surfaces aligned: five closed schemas, the standard-
|
|
6
|
+
library runtime boundary, frozen legacy evidence/ClaimIntent identities, the
|
|
7
|
+
one #660-then-#672 Stage-5 checkpoint, consumer wording, and the honest
|
|
8
|
+
UNMEASURED-with-no-measurement-artifact boundary.
|
|
9
|
+
|
|
10
|
+
Exit 0 on success, 1 on integration errors, and 2 on invocation errors.
|
|
11
|
+
"""
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import argparse
|
|
15
|
+
import ast
|
|
16
|
+
import hashlib
|
|
17
|
+
import json
|
|
18
|
+
import re
|
|
19
|
+
import stat
|
|
20
|
+
import sys
|
|
21
|
+
import tomllib
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
from typing import Any
|
|
24
|
+
|
|
25
|
+
from jsonschema import Draft202012Validator
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
29
|
+
|
|
30
|
+
SIDECAR_SCHEMA = Path(
|
|
31
|
+
"shared/contracts/passport/preregistration_artifact.schema.json"
|
|
32
|
+
)
|
|
33
|
+
EVIDENCE_SCHEMA = Path("shared/contracts/evidence/evidence_row_v1_2.schema.json")
|
|
34
|
+
MANIFEST_SCHEMA = Path(
|
|
35
|
+
"shared/contracts/audit/cross_document_source_manifest.schema.json"
|
|
36
|
+
)
|
|
37
|
+
DRAFT_SCHEMA = Path(
|
|
38
|
+
"shared/contracts/audit/cross_document_consistency_advisory_draft.schema.json"
|
|
39
|
+
)
|
|
40
|
+
ADVISORY_SCHEMA = Path(
|
|
41
|
+
"shared/contracts/audit/cross_document_consistency_advisory.schema.json"
|
|
42
|
+
)
|
|
43
|
+
RUNTIME = Path("scripts/build_cross_document_consistency_advisory.py")
|
|
44
|
+
RUNTIME_TEST = Path("scripts/test_cross_document_consistency_advisory.py")
|
|
45
|
+
DESIGN_SPEC = Path(
|
|
46
|
+
"docs/design/2026-08-10-672-cross-document-consistency-advisory-spec.md"
|
|
47
|
+
)
|
|
48
|
+
PROTOCOL = Path(
|
|
49
|
+
"shared/references/cross_document_consistency_advisory_protocol.md"
|
|
50
|
+
)
|
|
51
|
+
CONTRACT_README = Path("shared/contracts/README.md")
|
|
52
|
+
EVIDENCE_PROTOCOL = Path("shared/references/evidence_row_protocol.md")
|
|
53
|
+
CLAIM_LADDER = Path("shared/references/claim_strength_ladder.md")
|
|
54
|
+
PREREG_GUIDE = Path("deep-research/references/preregistration_guide.md")
|
|
55
|
+
HANDOFF_SCHEMAS = Path("shared/handoff_schemas.md")
|
|
56
|
+
DEEP_SKILL = Path("deep-research/SKILL.md")
|
|
57
|
+
ARCHITECT = Path("deep-research/agents/research_architect_agent.md")
|
|
58
|
+
ARCHITECT_MIRROR = Path("agents/research_architect_agent.md")
|
|
59
|
+
HANDOFF_EXAMPLE = Path("deep-research/examples/handoff_to_paper.md")
|
|
60
|
+
PAPER_SKILL = Path("academic-paper/SKILL.md")
|
|
61
|
+
INTAKE_AGENT = Path("academic-paper/agents/intake_agent.md")
|
|
62
|
+
PIPELINE_SKILL = Path("academic-pipeline/SKILL.md")
|
|
63
|
+
PIPELINE_ORCHESTRATOR = Path(
|
|
64
|
+
"academic-pipeline/agents/pipeline_orchestrator_agent.md"
|
|
65
|
+
)
|
|
66
|
+
INTEGRITY_PROTOCOL = Path(
|
|
67
|
+
"academic-pipeline/references/integrity_review_protocol.md"
|
|
68
|
+
)
|
|
69
|
+
STATE_MACHINE = Path("academic-pipeline/references/pipeline_state_machine.md")
|
|
70
|
+
CHANGELOG = Path("CHANGELOG.md")
|
|
71
|
+
HELDOUT_ROOT = Path("evals/heldout/cross_document_consistency")
|
|
72
|
+
HELDOUT_STATUS = HELDOUT_ROOT / "README.md"
|
|
73
|
+
CI_MANIFEST = Path("scripts/_ci_pytest_manifest.toml")
|
|
74
|
+
WORKFLOW = Path(".github/workflows/spec-consistency.yml")
|
|
75
|
+
|
|
76
|
+
LEGACY_HASHES = {
|
|
77
|
+
Path("shared/contracts/evidence/evidence_row.schema.json"):
|
|
78
|
+
"02f4fc4e32658249e7065724f1cb5c2f9dcec3f599f86a1a7ffee726ae422f5a",
|
|
79
|
+
Path("shared/contracts/evidence/evidence_row_v1_1.schema.json"):
|
|
80
|
+
"ab7fdb15b8845bcf898fef5177c636b8ca43f2785c3b79bf284fa04a4ede14b9",
|
|
81
|
+
Path("scripts/evidence_rows.py"):
|
|
82
|
+
"eccfa0a5cfe9b438aac9c4ec85cd6c2ca07052de7eb521cfc1e7f799a971d7e3",
|
|
83
|
+
Path("shared/contracts/passport/claim_intent_manifest.schema.json"):
|
|
84
|
+
"d6c4fd060812dc2a2b2dd73b6d9e77e366fcc0803486d5f38b4def6893d70cec",
|
|
85
|
+
Path("shared/contracts/revision/claim_surface_manifest.schema.json"):
|
|
86
|
+
"85460c1c195c890eb505c95e2767f72461c4a1f631203b7b26decb7a841afb1d",
|
|
87
|
+
Path("deep-research/templates/preregistration_template.md"):
|
|
88
|
+
"40054e26c527ff3dd237a5eef3fee60b821cf8549e210d48a057005333c8e0d2",
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
SCHEMA_VERSIONS = {
|
|
92
|
+
SIDECAR_SCHEMA: "preregistration-artifact/1.0",
|
|
93
|
+
EVIDENCE_SCHEMA: "evidence-row/1.2",
|
|
94
|
+
MANIFEST_SCHEMA: "cross-document-source-manifest/1.0",
|
|
95
|
+
DRAFT_SCHEMA: "cross-document-consistency-advisory-draft/1.0",
|
|
96
|
+
ADVISORY_SCHEMA: "cross-document-consistency-advisory/1.0",
|
|
97
|
+
}
|
|
98
|
+
NEW_SCHEMA_HASHES = {
|
|
99
|
+
SIDECAR_SCHEMA:
|
|
100
|
+
"998c8a1df9149a591fc722fabc2b2afce4bc27ea23212c2b7a8e0c4f1bcea05b",
|
|
101
|
+
EVIDENCE_SCHEMA:
|
|
102
|
+
"277e7b7b437a523286e06d2f55d058989f88865f4a364045405c5bcb33d94c51",
|
|
103
|
+
MANIFEST_SCHEMA:
|
|
104
|
+
"875285713a881d6228d7d1a4af882d66d881628549b6917b96c350e0b4fd3d4a",
|
|
105
|
+
DRAFT_SCHEMA:
|
|
106
|
+
"fa061192e0d97f3913b9af83228f4355f1879a56955d2609cc1279b7f206f3e0",
|
|
107
|
+
ADVISORY_SCHEMA:
|
|
108
|
+
"2bc6229ad77a5e86bd96021b3ac1d1fc8afc6834c4158280ca01091629652418",
|
|
109
|
+
}
|
|
110
|
+
SCHEMA_EXTERNAL_REF_ALLOWLIST = {
|
|
111
|
+
SIDECAR_SCHEMA: frozenset(),
|
|
112
|
+
EVIDENCE_SCHEMA: frozenset(),
|
|
113
|
+
MANIFEST_SCHEMA: frozenset(),
|
|
114
|
+
DRAFT_SCHEMA: frozenset(),
|
|
115
|
+
ADVISORY_SCHEMA: frozenset(
|
|
116
|
+
{"../evidence/evidence_row_v1_2.schema.json"}
|
|
117
|
+
),
|
|
118
|
+
}
|
|
119
|
+
PAIR_ORDER = (
|
|
120
|
+
"abstract_results",
|
|
121
|
+
"discussion_results",
|
|
122
|
+
"methods_reported_analyses",
|
|
123
|
+
"manuscript_preregistration",
|
|
124
|
+
)
|
|
125
|
+
PAIR_ROLES = {
|
|
126
|
+
"abstract_results": ("abstract", "results"),
|
|
127
|
+
"discussion_results": ("discussion", "results"),
|
|
128
|
+
"methods_reported_analyses": ("methods", "reported_analyses"),
|
|
129
|
+
"manuscript_preregistration": (
|
|
130
|
+
"manuscript_report",
|
|
131
|
+
"preregistration",
|
|
132
|
+
"disclosure_scope",
|
|
133
|
+
),
|
|
134
|
+
}
|
|
135
|
+
FINDING_TYPES = {
|
|
136
|
+
"abstract_results": {
|
|
137
|
+
"numeric_mismatch",
|
|
138
|
+
"direction_mismatch",
|
|
139
|
+
"significance_mismatch",
|
|
140
|
+
"claim_strength_rung_mismatch",
|
|
141
|
+
},
|
|
142
|
+
"discussion_results": {
|
|
143
|
+
"direction_mismatch",
|
|
144
|
+
"claim_strength_rung_mismatch",
|
|
145
|
+
"scope_or_population_overreach",
|
|
146
|
+
},
|
|
147
|
+
"methods_reported_analyses": {
|
|
148
|
+
"declared_analysis_no_reported_counterpart",
|
|
149
|
+
"reported_analysis_no_declared_counterpart",
|
|
150
|
+
"analysis_specification_conflict",
|
|
151
|
+
},
|
|
152
|
+
"manuscript_preregistration": {"undisclosed_preregistration_deviation"},
|
|
153
|
+
}
|
|
154
|
+
OUTCOMES = {
|
|
155
|
+
"POTENTIAL_INCONSISTENCY_LOCATED",
|
|
156
|
+
"NO_LISTED_INCONSISTENCY_LOCATED",
|
|
157
|
+
}
|
|
158
|
+
NEGATIVE_BASES = {
|
|
159
|
+
"legitimate_compression",
|
|
160
|
+
"same_rung_rewording",
|
|
161
|
+
"disclosed_deviation",
|
|
162
|
+
"other_no_listed_observation",
|
|
163
|
+
}
|
|
164
|
+
FAILURE_STATES = {
|
|
165
|
+
"not_checked",
|
|
166
|
+
"source_missing",
|
|
167
|
+
"access_failed",
|
|
168
|
+
"retrieval_failed",
|
|
169
|
+
}
|
|
170
|
+
EVIDENCE_STATES = FAILURE_STATES | {"agent_extracted", "checked_no_match"}
|
|
171
|
+
DIAGNOSTIC_CODES = {
|
|
172
|
+
"NAMED_INPUT_UNREADABLE",
|
|
173
|
+
"DRAFT_CONTRACT_INVALID",
|
|
174
|
+
"SOURCE_MANIFEST_INVALID",
|
|
175
|
+
"SOURCE_BINDING_INVALID",
|
|
176
|
+
"EVIDENCE_REPLAY_INVALID",
|
|
177
|
+
"FINAL_ARTIFACT_INVALID",
|
|
178
|
+
"RESOURCE_LIMIT",
|
|
179
|
+
}
|
|
180
|
+
BOUNDARY = {
|
|
181
|
+
"semantic_observation_not_recomputed": True,
|
|
182
|
+
"stage_4_5_verdict_unchanged": True,
|
|
183
|
+
"stage_5_routing_unchanged": True,
|
|
184
|
+
"integrity_issue_counts_unchanged": True,
|
|
185
|
+
"formatter_gate_unchanged": True,
|
|
186
|
+
"terminal_policy_unchanged": True,
|
|
187
|
+
"score_not_produced": True,
|
|
188
|
+
"automatic_rewrite_not_performed": True,
|
|
189
|
+
"agreement_not_certified": True,
|
|
190
|
+
}
|
|
191
|
+
RESOURCE_LIMITS = {
|
|
192
|
+
"MAX_DRAFT_BYTES": 16 * 1024 * 1024,
|
|
193
|
+
"MAX_MANIFEST_BYTES": 1 * 1024 * 1024,
|
|
194
|
+
"MAX_SIDECAR_BYTES": 1 * 1024 * 1024,
|
|
195
|
+
"MAX_FINAL_BYTES": 32 * 1024 * 1024,
|
|
196
|
+
"MAX_ACCEPTED_DRAFT_BYTES": 8 * 1024 * 1024,
|
|
197
|
+
"MAX_PREREGISTRATION_BYTES": 64 * 1024 * 1024,
|
|
198
|
+
"MAX_TOTAL_SOURCE_BYTES": 72 * 1024 * 1024,
|
|
199
|
+
"MAX_OBSERVATIONS": 4096,
|
|
200
|
+
"MAX_JSON_DEPTH": 100,
|
|
201
|
+
"MAX_JSON_NODES": 1_000_000,
|
|
202
|
+
"MAX_PAGE_SIZE": 25,
|
|
203
|
+
}
|
|
204
|
+
FORBIDDEN_PROPERTY_NAMES = {
|
|
205
|
+
"acceptance",
|
|
206
|
+
"adequacy",
|
|
207
|
+
"approval",
|
|
208
|
+
"authorization",
|
|
209
|
+
"clean_certificate",
|
|
210
|
+
"compliance",
|
|
211
|
+
"confidence",
|
|
212
|
+
"consent_protocol",
|
|
213
|
+
"gate",
|
|
214
|
+
"measurement_rows",
|
|
215
|
+
"pass_fail",
|
|
216
|
+
"probability",
|
|
217
|
+
"readiness",
|
|
218
|
+
"revision_operation",
|
|
219
|
+
"rewrite",
|
|
220
|
+
"score",
|
|
221
|
+
"severity",
|
|
222
|
+
"verdict",
|
|
223
|
+
}
|
|
224
|
+
FORBIDDEN_IMPORT_ROOTS = {
|
|
225
|
+
"aiohttp",
|
|
226
|
+
"anthropic",
|
|
227
|
+
"cohere",
|
|
228
|
+
"http",
|
|
229
|
+
"httpx",
|
|
230
|
+
"mistralai",
|
|
231
|
+
"multiprocessing",
|
|
232
|
+
"openai",
|
|
233
|
+
"requests",
|
|
234
|
+
"socket",
|
|
235
|
+
"subprocess",
|
|
236
|
+
"urllib3",
|
|
237
|
+
}
|
|
238
|
+
FORBIDDEN_IMPORT_PREFIXES = {"http.client", "urllib.request"}
|
|
239
|
+
FORBIDDEN_CALLS = {
|
|
240
|
+
"__import__",
|
|
241
|
+
"compile",
|
|
242
|
+
"eval",
|
|
243
|
+
"exec",
|
|
244
|
+
"os.getenv",
|
|
245
|
+
"os.popen",
|
|
246
|
+
"os.system",
|
|
247
|
+
"subprocess.Popen",
|
|
248
|
+
"subprocess.call",
|
|
249
|
+
"subprocess.check_call",
|
|
250
|
+
"subprocess.check_output",
|
|
251
|
+
"subprocess.run",
|
|
252
|
+
"time.monotonic",
|
|
253
|
+
"time.perf_counter",
|
|
254
|
+
"time.time",
|
|
255
|
+
"urllib.request.urlopen",
|
|
256
|
+
}
|
|
257
|
+
ALLOWED_RUNTIME_IMPORTS = frozenset(
|
|
258
|
+
{
|
|
259
|
+
"__future__",
|
|
260
|
+
"argparse",
|
|
261
|
+
"collections.abc",
|
|
262
|
+
"copy",
|
|
263
|
+
"datetime",
|
|
264
|
+
"hashlib",
|
|
265
|
+
"json",
|
|
266
|
+
"os",
|
|
267
|
+
"pathlib",
|
|
268
|
+
"re",
|
|
269
|
+
"stat",
|
|
270
|
+
"sys",
|
|
271
|
+
"tempfile",
|
|
272
|
+
"typing",
|
|
273
|
+
"unicodedata",
|
|
274
|
+
"urllib.parse",
|
|
275
|
+
}
|
|
276
|
+
)
|
|
277
|
+
ALLOWED_CLI_OPTIONS = frozenset(
|
|
278
|
+
{
|
|
279
|
+
"--accepted-draft",
|
|
280
|
+
"--advisory",
|
|
281
|
+
"--artifact-id",
|
|
282
|
+
"--artifact-provenance",
|
|
283
|
+
"--companion",
|
|
284
|
+
"--declared-at",
|
|
285
|
+
"--draft",
|
|
286
|
+
"--manifest",
|
|
287
|
+
"--output",
|
|
288
|
+
"--page",
|
|
289
|
+
"--page-size",
|
|
290
|
+
"--preregistration-companion",
|
|
291
|
+
"--preregistration-record",
|
|
292
|
+
"--relative-path",
|
|
293
|
+
"--status",
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
ALLOWED_SUBCOMMANDS = frozenset(
|
|
297
|
+
{"build-preregistration-artifact", "finalize", "render", "validate"}
|
|
298
|
+
)
|
|
299
|
+
FORBIDDEN_CONSUMER_IDENTIFIER_PARTS = frozenset(
|
|
300
|
+
{
|
|
301
|
+
"auditartifactentry",
|
|
302
|
+
"auditresult",
|
|
303
|
+
"auditverdict",
|
|
304
|
+
"claimintent",
|
|
305
|
+
"codexaudit",
|
|
306
|
+
"multifileaudit",
|
|
307
|
+
"p1finding",
|
|
308
|
+
"p2finding",
|
|
309
|
+
"p3finding",
|
|
310
|
+
"torturedphrase",
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
FORBIDDEN_LEGACY_MAPPING_LITERALS = frozenset(
|
|
314
|
+
{"P1", "P2", "P3", "PASS", "MINOR", "MATERIAL"}
|
|
315
|
+
)
|
|
316
|
+
FORBIDDEN_CLOCK_SUFFIXES = {
|
|
317
|
+
"datetime.now",
|
|
318
|
+
"datetime.today",
|
|
319
|
+
"datetime.utcnow",
|
|
320
|
+
"date.today",
|
|
321
|
+
}
|
|
322
|
+
FORBIDDEN_SCAN_NAMES = {
|
|
323
|
+
"fwalk",
|
|
324
|
+
"glob",
|
|
325
|
+
"iglob",
|
|
326
|
+
"iterdir",
|
|
327
|
+
"listdir",
|
|
328
|
+
"rglob",
|
|
329
|
+
"scandir",
|
|
330
|
+
"walk",
|
|
331
|
+
}
|
|
332
|
+
PURE_RENDER_FORBIDDEN_NAMES = FORBIDDEN_SCAN_NAMES | {
|
|
333
|
+
"open",
|
|
334
|
+
"read_bytes",
|
|
335
|
+
"read_text",
|
|
336
|
+
"write_bytes",
|
|
337
|
+
"write_text",
|
|
338
|
+
"urlopen",
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
AFFIRMATIVE_CLAIM_RE = re.compile(
|
|
342
|
+
r"\b(?:improves?|increases?|boosts?|achieves?|demonstrates?|establishes?|"
|
|
343
|
+
r"guarantees?|ensures?|proves?|certifies?|delivers?|provides?)\b"
|
|
344
|
+
r"[^.\n]{0,100}\b(?:accuracy|efficacy|coverage(?:\s+improvement)?|"
|
|
345
|
+
r"clean(?:[- ]document)?|cross[- ]document\s+agreement|agreement)\b",
|
|
346
|
+
flags=re.IGNORECASE,
|
|
347
|
+
)
|
|
348
|
+
OWNED_DOC_MARKERS = (
|
|
349
|
+
"#672",
|
|
350
|
+
"ADV-XDOC",
|
|
351
|
+
"build-preregistration-artifact",
|
|
352
|
+
"cross-document",
|
|
353
|
+
"cross_document_consistency",
|
|
354
|
+
"evidence-row/1.2",
|
|
355
|
+
"preregistration-artifact/1.0",
|
|
356
|
+
)
|
|
357
|
+
DEDICATED_CLAIM_CEILING_DOCS = frozenset(
|
|
358
|
+
{DESIGN_SPEC, PROTOCOL, HELDOUT_STATUS}
|
|
359
|
+
)
|
|
360
|
+
RENDERER_CLAIM_CEILING_SENTENCE = (
|
|
361
|
+
"NO LISTED INCONSISTENCY LOCATED — not proof of agreement, completeness, "
|
|
362
|
+
"or a clean document."
|
|
363
|
+
)
|
|
364
|
+
FUNCTION_SCOPED_RUNTIME_MARKERS: dict[str, tuple[str, ...]] = {
|
|
365
|
+
"_array": ("len(value) > maximum",),
|
|
366
|
+
"_precheck_depth": ("if depth > MAX_JSON_DEPTH:",),
|
|
367
|
+
"_count_nodes": ("if count > MAX_JSON_NODES:",),
|
|
368
|
+
"_strict_json_bytes": (
|
|
369
|
+
"_precheck_depth(text, code=code, path=path)",
|
|
370
|
+
"value = json.loads(",
|
|
371
|
+
"_count_nodes(value, code=code, path=path)",
|
|
372
|
+
"_reject_unsafe_json_strings(value, code=code, path=path)",
|
|
373
|
+
),
|
|
374
|
+
"build_preregistration_artifact": (
|
|
375
|
+
'if state == "provided":',
|
|
376
|
+
"text = _strict_source(\n companion_bytes,",
|
|
377
|
+
'label="preregistration companion"',
|
|
378
|
+
"if not text.strip():",
|
|
379
|
+
'_fail("SOURCE_BINDING_INVALID", "companion", "must not be blank")',
|
|
380
|
+
),
|
|
381
|
+
"_prepare_inputs": ("if total > MAX_TOTAL_SOURCE_BYTES:",),
|
|
382
|
+
"finalize_advisory": (
|
|
383
|
+
"if len(_canonical_bytes(report)) > MAX_FINAL_BYTES:",
|
|
384
|
+
),
|
|
385
|
+
"paginate": ("page_size > MAX_PAGE_SIZE",),
|
|
386
|
+
"render_advisory": (
|
|
387
|
+
RENDERER_CLAIM_CEILING_SENTENCE,
|
|
388
|
+
'if observation["outcome"] == "NO_LISTED_INCONSISTENCY_LOCATED":',
|
|
389
|
+
"result = f\"{observation['outcome']} — {observation['negative_basis']}\"",
|
|
390
|
+
),
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
REQUIRED_POINTERS: dict[Path, tuple[str, ...]] = {
|
|
394
|
+
DESIGN_SPEC: (
|
|
395
|
+
"DESIGN-FROZEN / UNMEASURED",
|
|
396
|
+
"evidence-row/1.2",
|
|
397
|
+
"build-preregistration-artifact",
|
|
398
|
+
"#660 first and #672 second",
|
|
399
|
+
"ADVISORY_UNAVAILABLE:<CODE>",
|
|
400
|
+
),
|
|
401
|
+
PROTOCOL: (
|
|
402
|
+
"preregistration-artifact/1.0",
|
|
403
|
+
"evidence-row/1.2",
|
|
404
|
+
"cross-document-source-manifest/1.0",
|
|
405
|
+
"cross-document-consistency-advisory-draft/1.0",
|
|
406
|
+
"cross-document-consistency-advisory/1.0",
|
|
407
|
+
"LLM-ADVISORY",
|
|
408
|
+
"UNMEASURED",
|
|
409
|
+
"ADVISORY_UNAVAILABLE:<CODE>",
|
|
410
|
+
),
|
|
411
|
+
CONTRACT_README: (
|
|
412
|
+
"Cross-document consistency advisory (#672)",
|
|
413
|
+
"preregistration-artifact/1.0",
|
|
414
|
+
str(EVIDENCE_SCHEMA),
|
|
415
|
+
"#660 runs first and #672 second",
|
|
416
|
+
"ADVISORY_UNAVAILABLE:<CODE>",
|
|
417
|
+
),
|
|
418
|
+
EVIDENCE_PROTOCOL: (
|
|
419
|
+
str(EVIDENCE_SCHEMA),
|
|
420
|
+
"cross_document_consistency",
|
|
421
|
+
"disclosure_scope",
|
|
422
|
+
"UNMEASURED",
|
|
423
|
+
),
|
|
424
|
+
CLAIM_LADDER: ("#672", "LLM-ADVISORY", "UNMEASURED"),
|
|
425
|
+
PREREG_GUIDE: (
|
|
426
|
+
"build-preregistration-artifact",
|
|
427
|
+
"preregistration-artifact/1.0",
|
|
428
|
+
"UNMEASURED",
|
|
429
|
+
),
|
|
430
|
+
HANDOFF_SCHEMAS: (
|
|
431
|
+
"preregistration-artifact/1.0",
|
|
432
|
+
"digest-check",
|
|
433
|
+
"byte-for-byte",
|
|
434
|
+
),
|
|
435
|
+
DEEP_SKILL: (
|
|
436
|
+
"preregistration-artifact/1.0",
|
|
437
|
+
"build-preregistration-artifact",
|
|
438
|
+
"research_architect_agent",
|
|
439
|
+
),
|
|
440
|
+
ARCHITECT: (
|
|
441
|
+
"preregistration-artifact/1.0",
|
|
442
|
+
"build-preregistration-artifact",
|
|
443
|
+
"must not",
|
|
444
|
+
),
|
|
445
|
+
ARCHITECT_MIRROR: (
|
|
446
|
+
"preregistration-artifact/1.0",
|
|
447
|
+
"build-preregistration-artifact",
|
|
448
|
+
"must not",
|
|
449
|
+
),
|
|
450
|
+
HANDOFF_EXAMPLE: (
|
|
451
|
+
"preregistration-artifact/1.0",
|
|
452
|
+
"agreement",
|
|
453
|
+
"record_digest",
|
|
454
|
+
),
|
|
455
|
+
PAPER_SKILL: (
|
|
456
|
+
"preregistration-artifact/1.0",
|
|
457
|
+
str(PROTOCOL),
|
|
458
|
+
),
|
|
459
|
+
INTAKE_AGENT: (
|
|
460
|
+
"preregistration-artifact/1.0",
|
|
461
|
+
"record_digest",
|
|
462
|
+
"companion",
|
|
463
|
+
),
|
|
464
|
+
PIPELINE_SKILL: (
|
|
465
|
+
"#660 first and #672 second",
|
|
466
|
+
"ADVISORY_UNAVAILABLE:<CODE>",
|
|
467
|
+
"LLM-ADVISORY",
|
|
468
|
+
"UNMEASURED",
|
|
469
|
+
),
|
|
470
|
+
PIPELINE_ORCHESTRATOR: (
|
|
471
|
+
"#660",
|
|
472
|
+
"#672",
|
|
473
|
+
"ADVISORY_UNAVAILABLE:<CODE>",
|
|
474
|
+
"accepted_draft_artifact_id",
|
|
475
|
+
"accepted_draft_sha256",
|
|
476
|
+
),
|
|
477
|
+
INTEGRITY_PROTOCOL: (
|
|
478
|
+
"#660",
|
|
479
|
+
"#672",
|
|
480
|
+
"Stage 4.5",
|
|
481
|
+
"Stage 5",
|
|
482
|
+
),
|
|
483
|
+
STATE_MACHINE: (
|
|
484
|
+
"#660",
|
|
485
|
+
"#672",
|
|
486
|
+
"ADVISORY_UNAVAILABLE:<CODE>",
|
|
487
|
+
"Stage 5",
|
|
488
|
+
),
|
|
489
|
+
HELDOUT_STATUS: (
|
|
490
|
+
"UNMEASURED",
|
|
491
|
+
"no `measurement-*.json`",
|
|
492
|
+
"not proof of agreement",
|
|
493
|
+
),
|
|
494
|
+
CHANGELOG: (
|
|
495
|
+
"cross-document consistency advisory",
|
|
496
|
+
"#672",
|
|
497
|
+
"UNMEASURED",
|
|
498
|
+
),
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
class DuplicateKeyError(ValueError):
|
|
503
|
+
"""Raised when strict JSON encounters a duplicate member name."""
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
def _pairs(pairs: list[tuple[str, Any]]) -> dict[str, Any]:
|
|
507
|
+
result: dict[str, Any] = {}
|
|
508
|
+
for key, value in pairs:
|
|
509
|
+
if key in result:
|
|
510
|
+
raise DuplicateKeyError(f"duplicate JSON key {key!r}")
|
|
511
|
+
result[key] = value
|
|
512
|
+
return result
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
def _load_json(path: Path) -> dict[str, Any]:
|
|
516
|
+
value = json.loads(
|
|
517
|
+
path.read_text(encoding="utf-8"),
|
|
518
|
+
object_pairs_hook=_pairs,
|
|
519
|
+
parse_constant=lambda token: (_ for _ in ()).throw(
|
|
520
|
+
ValueError(f"non-finite JSON constant {token!r}")
|
|
521
|
+
),
|
|
522
|
+
)
|
|
523
|
+
if not isinstance(value, dict):
|
|
524
|
+
raise ValueError("top level must be an object")
|
|
525
|
+
return value
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
def _properties(schema: dict[str, Any]) -> set[str]:
|
|
529
|
+
value = schema.get("properties")
|
|
530
|
+
return set(value) if isinstance(value, dict) else set()
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def _all_property_names(value: Any) -> set[str]:
|
|
534
|
+
names: set[str] = set()
|
|
535
|
+
if isinstance(value, dict):
|
|
536
|
+
properties = value.get("properties")
|
|
537
|
+
if isinstance(properties, dict):
|
|
538
|
+
names.update(properties)
|
|
539
|
+
for child in value.values():
|
|
540
|
+
names.update(_all_property_names(child))
|
|
541
|
+
elif isinstance(value, list):
|
|
542
|
+
for child in value:
|
|
543
|
+
names.update(_all_property_names(child))
|
|
544
|
+
return names
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
def _all_refs(value: Any) -> set[str]:
|
|
548
|
+
refs: set[str] = set()
|
|
549
|
+
if isinstance(value, dict):
|
|
550
|
+
ref = value.get("$ref")
|
|
551
|
+
if isinstance(ref, str):
|
|
552
|
+
refs.add(ref)
|
|
553
|
+
for child in value.values():
|
|
554
|
+
refs.update(_all_refs(child))
|
|
555
|
+
elif isinstance(value, list):
|
|
556
|
+
for child in value:
|
|
557
|
+
refs.update(_all_refs(child))
|
|
558
|
+
return refs
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
def _check_closed(value: Any, location: str, errors: list[str]) -> None:
|
|
562
|
+
if isinstance(value, dict):
|
|
563
|
+
# Partial conditional/contains fragments intentionally constrain a base
|
|
564
|
+
# object without reopening it. A shape-owning object has two or more
|
|
565
|
+
# required members and must close them itself.
|
|
566
|
+
if (
|
|
567
|
+
value.get("type") == "object"
|
|
568
|
+
and len(value.get("required", [])) >= 2
|
|
569
|
+
and value.get("additionalProperties") is not False
|
|
570
|
+
):
|
|
571
|
+
errors.append(f"{location}: object schema must be recursively closed")
|
|
572
|
+
for key, child in value.items():
|
|
573
|
+
_check_closed(child, f"{location}.{key}", errors)
|
|
574
|
+
elif isinstance(value, list):
|
|
575
|
+
for index, child in enumerate(value):
|
|
576
|
+
_check_closed(child, f"{location}[{index}]", errors)
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
def _const(schema: dict[str, Any], field: str) -> Any:
|
|
580
|
+
return schema["properties"][field].get("const")
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
def _schema_errors(root: Path) -> list[str]:
|
|
584
|
+
errors: list[str] = []
|
|
585
|
+
schemas: dict[Path, dict[str, Any]] = {}
|
|
586
|
+
for relative, version in SCHEMA_VERSIONS.items():
|
|
587
|
+
try:
|
|
588
|
+
schema_path = root / relative
|
|
589
|
+
raw = schema_path.read_bytes()
|
|
590
|
+
if hashlib.sha256(raw).hexdigest() != NEW_SCHEMA_HASHES[relative]:
|
|
591
|
+
errors.append(f"{relative}: frozen new schema sha256 drifted")
|
|
592
|
+
schema = _load_json(schema_path)
|
|
593
|
+
Draft202012Validator.check_schema(schema)
|
|
594
|
+
_check_closed(schema, str(relative), errors)
|
|
595
|
+
if _const(schema, "schema_version") != version:
|
|
596
|
+
errors.append(f"{relative}: schema_version must equal {version}")
|
|
597
|
+
continue
|
|
598
|
+
schemas[relative] = schema
|
|
599
|
+
forbidden = _all_property_names(schema) & FORBIDDEN_PROPERTY_NAMES
|
|
600
|
+
if forbidden:
|
|
601
|
+
errors.append(
|
|
602
|
+
f"{relative}: forbidden determination fields: {sorted(forbidden)}"
|
|
603
|
+
)
|
|
604
|
+
external_refs = {ref for ref in _all_refs(schema) if not ref.startswith("#")}
|
|
605
|
+
if external_refs != set(SCHEMA_EXTERNAL_REF_ALLOWLIST[relative]):
|
|
606
|
+
errors.append(
|
|
607
|
+
f"{relative}: schema external $ref allowlist drifted: "
|
|
608
|
+
f"{sorted(external_refs)}"
|
|
609
|
+
)
|
|
610
|
+
except (OSError, UnicodeError, ValueError, KeyError) as exc:
|
|
611
|
+
errors.append(f"{relative}: schema load/check failed: {type(exc).__name__}")
|
|
612
|
+
if len(schemas) != len(SCHEMA_VERSIONS):
|
|
613
|
+
return errors
|
|
614
|
+
|
|
615
|
+
sidecar = schemas[SIDECAR_SCHEMA]
|
|
616
|
+
if set(sidecar["properties"]["status"].get("enum", [])) != {
|
|
617
|
+
"provided", "not_provided", "access_failed", "retrieval_failed"
|
|
618
|
+
}:
|
|
619
|
+
errors.append("preregistration sidecar status mapping vocabulary drifted")
|
|
620
|
+
if sidecar["properties"]["source_artifact_size_bytes"].get("maximum") != 67108864:
|
|
621
|
+
errors.append("preregistration sidecar 64 MiB ceiling drifted")
|
|
622
|
+
if len(sidecar.get("allOf", [])) != 1:
|
|
623
|
+
errors.append("preregistration sidecar provided/unavailable conditional drifted")
|
|
624
|
+
|
|
625
|
+
manifest = schemas[MANIFEST_SCHEMA]
|
|
626
|
+
artifacts = manifest["properties"]["artifacts"]
|
|
627
|
+
if (artifacts.get("minItems"), artifacts.get("maxItems")) != (2, 2):
|
|
628
|
+
errors.append("source manifest must contain exactly two artifacts")
|
|
629
|
+
if len(artifacts.get("allOf", [])) != 2:
|
|
630
|
+
errors.append("source manifest one-manuscript/one-preregistration matrix drifted")
|
|
631
|
+
manifest_required = set(manifest.get("required", []))
|
|
632
|
+
if not {"accepted_draft_artifact_id", "accepted_draft_sha256", "manifest_digest"} <= manifest_required:
|
|
633
|
+
errors.append("source manifest designated accepted-draft binding drifted")
|
|
634
|
+
artifact = manifest["$defs"]["artifact"]
|
|
635
|
+
if set(artifact["properties"]["artifact_state"].get("enum", [])) != {
|
|
636
|
+
"present", "source_missing", "access_failed", "retrieval_failed"
|
|
637
|
+
}:
|
|
638
|
+
errors.append("source manifest availability vocabulary drifted")
|
|
639
|
+
|
|
640
|
+
evidence = schemas[EVIDENCE_SCHEMA]
|
|
641
|
+
if _const(evidence, "surface") != "cross_document_consistency":
|
|
642
|
+
errors.append("evidence-row/1.2 surface drifted")
|
|
643
|
+
if set(evidence["$defs"]["pair_kind"].get("enum", [])) != set(PAIR_ORDER):
|
|
644
|
+
errors.append("evidence-row pair roster drifted")
|
|
645
|
+
if set(evidence["$defs"]["evidence_slot"]["properties"]["evidence_state"].get("enum", [])) != EVIDENCE_STATES:
|
|
646
|
+
errors.append("evidence-row state vocabulary drifted")
|
|
647
|
+
for pair, roles in PAIR_ROLES.items():
|
|
648
|
+
slot_def = evidence["$defs"][f"{pair}_slots"]
|
|
649
|
+
expected_count = len(roles)
|
|
650
|
+
if (slot_def.get("minItems"), slot_def.get("maxItems")) != (expected_count, expected_count):
|
|
651
|
+
errors.append(f"evidence-row {pair} slot cardinality drifted")
|
|
652
|
+
prefix = slot_def.get("prefixItems", [])
|
|
653
|
+
actual_roles: list[Any] = []
|
|
654
|
+
for item in prefix:
|
|
655
|
+
ref = item.get("$ref", "")
|
|
656
|
+
actual_roles.append(ref.rsplit("/slot_", 1)[-1] if "/slot_" in ref else None)
|
|
657
|
+
if tuple(actual_roles) != roles:
|
|
658
|
+
errors.append(f"evidence-row {pair} ordered roles drifted")
|
|
659
|
+
checked = evidence["$defs"].get("checked_scope", {})
|
|
660
|
+
if set(checked.get("required", [])) != {
|
|
661
|
+
"source_span_utf8", "scope_sha256", "scope_utf8_bytes", "checked_at", "completeness_provenance"
|
|
662
|
+
}:
|
|
663
|
+
errors.append("checked_no_match checked_scope binding drifted")
|
|
664
|
+
if evidence["$defs"].get("cache", {}).get("properties", {}).get("status", {}).get("const") != "not_used":
|
|
665
|
+
errors.append("evidence-row cache must remain not_used")
|
|
666
|
+
|
|
667
|
+
draft = schemas[DRAFT_SCHEMA]
|
|
668
|
+
if _const(draft, "layer") != "LLM-ADVISORY":
|
|
669
|
+
errors.append("draft layer must equal LLM-ADVISORY")
|
|
670
|
+
observations = draft["properties"]["observations"]
|
|
671
|
+
if observations.get("maxItems") != 4096:
|
|
672
|
+
errors.append("draft observation ceiling drifted")
|
|
673
|
+
if set(draft["$defs"]["pair_kind"].get("enum", [])) != set(PAIR_ORDER):
|
|
674
|
+
errors.append("draft pair roster drifted")
|
|
675
|
+
if set(draft["$defs"]["outcome"].get("enum", [])) != OUTCOMES:
|
|
676
|
+
errors.append("draft outcome vocabulary drifted")
|
|
677
|
+
if set(draft["$defs"]["negative_basis"].get("enum", [])) != NEGATIVE_BASES:
|
|
678
|
+
errors.append("draft negative-basis vocabulary drifted")
|
|
679
|
+
if set(draft["$defs"]["finding_type"].get("enum", [])) != set().union(*FINDING_TYPES.values()):
|
|
680
|
+
errors.append("draft finding-type vocabulary drifted")
|
|
681
|
+
if len(observations.get("allOf", [])) != 4:
|
|
682
|
+
errors.append("draft must require at least one observation for every pair")
|
|
683
|
+
observation = draft["$defs"]["observation"]
|
|
684
|
+
if set(observation["properties"]["check_state"].get("enum", [])) != {"performed", "not_checked"}:
|
|
685
|
+
errors.append("draft check-state vocabulary drifted")
|
|
686
|
+
if len(observation.get("allOf", [])) < 15:
|
|
687
|
+
errors.append("draft pair/outcome/witness conditional matrix weakened")
|
|
688
|
+
prereg_slots = draft["$defs"]["manuscript_preregistration_slots"]
|
|
689
|
+
if (prereg_slots.get("minItems"), prereg_slots.get("maxItems")) != (3, 3):
|
|
690
|
+
errors.append("draft preregistration three-witness rule drifted")
|
|
691
|
+
|
|
692
|
+
final = schemas[ADVISORY_SCHEMA]
|
|
693
|
+
if _const(final, "layer") != "LLM-ADVISORY":
|
|
694
|
+
errors.append("final layer must equal LLM-ADVISORY")
|
|
695
|
+
if _const(final, "evaluation_status") != "UNMEASURED":
|
|
696
|
+
errors.append("final evaluation_status must equal UNMEASURED")
|
|
697
|
+
pair_results = final["properties"]["pair_results"]
|
|
698
|
+
if (pair_results.get("minItems"), pair_results.get("maxItems")) != (4, 4):
|
|
699
|
+
errors.append("final pair roster cardinality drifted")
|
|
700
|
+
refs = tuple(item.get("$ref") for item in pair_results.get("prefixItems", []))
|
|
701
|
+
expected_refs = tuple(f"#/$defs/pair_result_{pair}" for pair in PAIR_ORDER)
|
|
702
|
+
if refs != expected_refs or pair_results.get("items") is not False:
|
|
703
|
+
errors.append("final canonical pair ordering drifted")
|
|
704
|
+
binding_required = set(final["$defs"]["input_binding"].get("required", []))
|
|
705
|
+
required_binding = {
|
|
706
|
+
"draft_sha256", "source_manifest_sha256", "preregistration_record_sha256",
|
|
707
|
+
"preregistration_record_digest", "accepted_draft_artifact_id",
|
|
708
|
+
"accepted_draft_sha256", "source_bundle_sha256",
|
|
709
|
+
}
|
|
710
|
+
if not required_binding <= binding_required:
|
|
711
|
+
errors.append("final complete source/input binding drifted")
|
|
712
|
+
boundary = final["$defs"]["boundary"]
|
|
713
|
+
actual_boundary = {
|
|
714
|
+
key: item.get("const") for key, item in boundary.get("properties", {}).items()
|
|
715
|
+
}
|
|
716
|
+
if actual_boundary != BOUNDARY or set(boundary.get("required", [])) != set(BOUNDARY):
|
|
717
|
+
errors.append("final noninterference boundary drifted")
|
|
718
|
+
final_observation = final["$defs"]["final_observation"]
|
|
719
|
+
row_ref = final_observation["properties"]["evidence_row"].get("$ref")
|
|
720
|
+
if row_ref != "../evidence/evidence_row_v1_2.schema.json":
|
|
721
|
+
errors.append("final carrier must embed evidence-row/1.2 by relative ref")
|
|
722
|
+
return errors
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
def _call_name(node: ast.Call) -> str:
|
|
726
|
+
parts: list[str] = []
|
|
727
|
+
value: ast.expr = node.func
|
|
728
|
+
while isinstance(value, ast.Attribute):
|
|
729
|
+
parts.append(value.attr)
|
|
730
|
+
value = value.value
|
|
731
|
+
if isinstance(value, ast.Name):
|
|
732
|
+
parts.append(value.id)
|
|
733
|
+
return ".".join(reversed(parts))
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
def _literal(node: ast.AST) -> Any:
|
|
737
|
+
if isinstance(node, ast.Constant):
|
|
738
|
+
return node.value
|
|
739
|
+
if isinstance(node, (ast.Tuple, ast.List, ast.Set)):
|
|
740
|
+
values = [_literal(item) for item in node.elts]
|
|
741
|
+
if isinstance(node, ast.Tuple):
|
|
742
|
+
return tuple(values)
|
|
743
|
+
if isinstance(node, ast.Set):
|
|
744
|
+
return set(values)
|
|
745
|
+
return values
|
|
746
|
+
if isinstance(node, ast.Dict):
|
|
747
|
+
return {_literal(key): _literal(value) for key, value in zip(node.keys, node.values)}
|
|
748
|
+
if isinstance(node, ast.BinOp) and isinstance(node.op, (ast.Mult, ast.Add)):
|
|
749
|
+
left, right = _literal(node.left), _literal(node.right)
|
|
750
|
+
return left * right if isinstance(node.op, ast.Mult) else left + right
|
|
751
|
+
if isinstance(node, ast.Call) and isinstance(node.func, ast.Name) and node.func.id == "frozenset" and len(node.args) == 1:
|
|
752
|
+
return frozenset(_literal(node.args[0]))
|
|
753
|
+
raise ValueError(f"unsupported literal: {type(node).__name__}")
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
def _assignments(tree: ast.Module) -> dict[str, Any]:
|
|
757
|
+
result: dict[str, Any] = {}
|
|
758
|
+
for node in tree.body:
|
|
759
|
+
if isinstance(node, ast.Assign) and len(node.targets) == 1 and isinstance(node.targets[0], ast.Name):
|
|
760
|
+
try:
|
|
761
|
+
result[node.targets[0].id] = _literal(node.value)
|
|
762
|
+
except ValueError:
|
|
763
|
+
pass
|
|
764
|
+
return result
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
def _normalized_identifier(value: str) -> str:
|
|
768
|
+
return "".join(character for character in value.lower() if character.isalnum())
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
def _docstring_nodes(tree: ast.Module) -> set[int]:
|
|
772
|
+
result: set[int] = set()
|
|
773
|
+
owners: list[ast.Module | ast.FunctionDef | ast.AsyncFunctionDef | ast.ClassDef] = [tree]
|
|
774
|
+
owners.extend(
|
|
775
|
+
node
|
|
776
|
+
for node in ast.walk(tree)
|
|
777
|
+
if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef))
|
|
778
|
+
)
|
|
779
|
+
for owner in owners:
|
|
780
|
+
if owner.body and isinstance(owner.body[0], ast.Expr):
|
|
781
|
+
value = owner.body[0].value
|
|
782
|
+
if isinstance(value, ast.Constant) and isinstance(value.value, str):
|
|
783
|
+
result.add(id(value))
|
|
784
|
+
return result
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
def _runtime_errors(root: Path) -> list[str]:
|
|
788
|
+
errors: list[str] = []
|
|
789
|
+
try:
|
|
790
|
+
source = (root / RUNTIME).read_text(encoding="utf-8")
|
|
791
|
+
tree = ast.parse(source)
|
|
792
|
+
except (OSError, UnicodeError, SyntaxError) as exc:
|
|
793
|
+
return [f"{RUNTIME}: runtime parse failed: {type(exc).__name__}"]
|
|
794
|
+
|
|
795
|
+
constants = _assignments(tree)
|
|
796
|
+
expected_constants: dict[str, Any] = {
|
|
797
|
+
"SIDECAR_SCHEMA_VERSION": SCHEMA_VERSIONS[SIDECAR_SCHEMA],
|
|
798
|
+
"EVIDENCE_SCHEMA_VERSION": SCHEMA_VERSIONS[EVIDENCE_SCHEMA],
|
|
799
|
+
"MANIFEST_SCHEMA_VERSION": SCHEMA_VERSIONS[MANIFEST_SCHEMA],
|
|
800
|
+
"DRAFT_SCHEMA_VERSION": SCHEMA_VERSIONS[DRAFT_SCHEMA],
|
|
801
|
+
"REPORT_SCHEMA_VERSION": SCHEMA_VERSIONS[ADVISORY_SCHEMA],
|
|
802
|
+
"SURFACE": "cross_document_consistency",
|
|
803
|
+
"LAYER": "LLM-ADVISORY",
|
|
804
|
+
"EVALUATION_STATUS": "UNMEASURED",
|
|
805
|
+
"PAIR_ORDER": PAIR_ORDER,
|
|
806
|
+
"PAIR_ROLES": PAIR_ROLES,
|
|
807
|
+
"DIAGNOSTIC_CODES": frozenset(DIAGNOSTIC_CODES),
|
|
808
|
+
"BOUNDARY": BOUNDARY,
|
|
809
|
+
**RESOURCE_LIMITS,
|
|
810
|
+
}
|
|
811
|
+
for name, expected in expected_constants.items():
|
|
812
|
+
if constants.get(name) != expected:
|
|
813
|
+
errors.append(f"runtime constant {name} drifted")
|
|
814
|
+
if constants.get("TEMPLATE_SHA256") != LEGACY_HASHES[Path("deep-research/templates/preregistration_template.md")]:
|
|
815
|
+
errors.append("runtime frozen preregistration-template digest drifted")
|
|
816
|
+
runtime_findings = constants.get("FINDING_TYPES")
|
|
817
|
+
if runtime_findings != {key: frozenset(value) for key, value in FINDING_TYPES.items()}:
|
|
818
|
+
errors.append("runtime pair/finding matrix drifted")
|
|
819
|
+
|
|
820
|
+
imports: set[str] = set()
|
|
821
|
+
calls: list[tuple[str, ast.Call]] = []
|
|
822
|
+
functions: dict[str, ast.FunctionDef | ast.AsyncFunctionDef] = {}
|
|
823
|
+
for node in ast.walk(tree):
|
|
824
|
+
if isinstance(node, ast.Import):
|
|
825
|
+
imports.update(alias.name for alias in node.names)
|
|
826
|
+
elif isinstance(node, ast.ImportFrom):
|
|
827
|
+
if node.module:
|
|
828
|
+
imports.add(node.module)
|
|
829
|
+
elif isinstance(node, ast.Call):
|
|
830
|
+
calls.append((_call_name(node), node))
|
|
831
|
+
elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)):
|
|
832
|
+
functions[node.name] = node
|
|
833
|
+
unexpected_imports = sorted(imports - ALLOWED_RUNTIME_IMPORTS)
|
|
834
|
+
if unexpected_imports:
|
|
835
|
+
errors.append(f"runtime import allowlist drifted: {unexpected_imports}")
|
|
836
|
+
bad_imports = sorted(
|
|
837
|
+
name for name in imports
|
|
838
|
+
if name.split(".", 1)[0] in FORBIDDEN_IMPORT_ROOTS
|
|
839
|
+
or any(name == prefix or name.startswith(prefix + ".") for prefix in FORBIDDEN_IMPORT_PREFIXES)
|
|
840
|
+
)
|
|
841
|
+
if bad_imports:
|
|
842
|
+
errors.append(f"runtime has forbidden model/network/process import: {bad_imports}")
|
|
843
|
+
|
|
844
|
+
forbidden_identifiers: set[str] = set()
|
|
845
|
+
for node in ast.walk(tree):
|
|
846
|
+
candidate: str | None = None
|
|
847
|
+
if isinstance(node, (ast.Name, ast.Attribute)):
|
|
848
|
+
candidate = node.id if isinstance(node, ast.Name) else node.attr
|
|
849
|
+
elif isinstance(node, ast.arg):
|
|
850
|
+
candidate = node.arg
|
|
851
|
+
elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)):
|
|
852
|
+
candidate = node.name
|
|
853
|
+
if candidate is None:
|
|
854
|
+
continue
|
|
855
|
+
normalized = _normalized_identifier(candidate)
|
|
856
|
+
if any(part in normalized for part in FORBIDDEN_CONSUMER_IDENTIFIER_PARTS):
|
|
857
|
+
forbidden_identifiers.add(candidate)
|
|
858
|
+
docs = _docstring_nodes(tree)
|
|
859
|
+
forbidden_literals: set[str] = set()
|
|
860
|
+
for node in ast.walk(tree):
|
|
861
|
+
if not isinstance(node, ast.Constant) or not isinstance(node.value, str):
|
|
862
|
+
continue
|
|
863
|
+
if id(node) in docs:
|
|
864
|
+
continue
|
|
865
|
+
normalized = _normalized_identifier(node.value)
|
|
866
|
+
if (
|
|
867
|
+
node.value in FORBIDDEN_LEGACY_MAPPING_LITERALS
|
|
868
|
+
or any(part in normalized for part in FORBIDDEN_CONSUMER_IDENTIFIER_PARTS)
|
|
869
|
+
):
|
|
870
|
+
forbidden_literals.add(node.value)
|
|
871
|
+
if forbidden_identifiers or forbidden_literals:
|
|
872
|
+
errors.append(
|
|
873
|
+
"runtime structured nonconsumer boundary drifted: "
|
|
874
|
+
f"identifiers={sorted(forbidden_identifiers)}, "
|
|
875
|
+
f"literals={sorted(forbidden_literals)}"
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
cli_options: set[str] = set()
|
|
879
|
+
subcommands: set[str] = set()
|
|
880
|
+
for node in ast.walk(tree):
|
|
881
|
+
if not isinstance(node, ast.Call) or not isinstance(node.func, ast.Attribute):
|
|
882
|
+
continue
|
|
883
|
+
if node.func.attr == "add_argument" and node.args:
|
|
884
|
+
first = node.args[0]
|
|
885
|
+
if isinstance(first, ast.Constant) and isinstance(first.value, str):
|
|
886
|
+
cli_options.add(first.value)
|
|
887
|
+
elif node.func.attr == "add_parser" and node.args:
|
|
888
|
+
first = node.args[0]
|
|
889
|
+
if isinstance(first, ast.Constant) and isinstance(first.value, str):
|
|
890
|
+
subcommands.add(first.value)
|
|
891
|
+
for node in ast.walk(tree):
|
|
892
|
+
if not isinstance(node, ast.For) or not isinstance(node.target, ast.Name):
|
|
893
|
+
continue
|
|
894
|
+
if not isinstance(node.iter, (ast.Tuple, ast.List)):
|
|
895
|
+
continue
|
|
896
|
+
if any(
|
|
897
|
+
isinstance(call, ast.Call)
|
|
898
|
+
and isinstance(call.func, ast.Attribute)
|
|
899
|
+
and call.func.attr == "add_parser"
|
|
900
|
+
and call.args
|
|
901
|
+
and isinstance(call.args[0], ast.Name)
|
|
902
|
+
and call.args[0].id == node.target.id
|
|
903
|
+
for statement in node.body
|
|
904
|
+
for call in ast.walk(statement)
|
|
905
|
+
):
|
|
906
|
+
subcommands.update(
|
|
907
|
+
item.value
|
|
908
|
+
for item in node.iter.elts
|
|
909
|
+
if isinstance(item, ast.Constant) and isinstance(item.value, str)
|
|
910
|
+
)
|
|
911
|
+
if cli_options != set(ALLOWED_CLI_OPTIONS) or subcommands != set(ALLOWED_SUBCOMMANDS):
|
|
912
|
+
errors.append(
|
|
913
|
+
"runtime parser input allowlist drifted: "
|
|
914
|
+
f"options={sorted(cli_options)}, subcommands={sorted(subcommands)}"
|
|
915
|
+
)
|
|
916
|
+
bad_calls = sorted(
|
|
917
|
+
{
|
|
918
|
+
name
|
|
919
|
+
for name, _ in calls
|
|
920
|
+
if name in FORBIDDEN_CALLS
|
|
921
|
+
or any(name == suffix or name.endswith("." + suffix) for suffix in FORBIDDEN_CLOCK_SUFFIXES)
|
|
922
|
+
}
|
|
923
|
+
)
|
|
924
|
+
if bad_calls:
|
|
925
|
+
errors.append(f"runtime has forbidden model/network/process/clock call: {bad_calls}")
|
|
926
|
+
scan_calls = sorted({name for name, _ in calls if name.rsplit(".", 1)[-1] in FORBIDDEN_SCAN_NAMES})
|
|
927
|
+
if scan_calls:
|
|
928
|
+
errors.append(f"runtime has forbidden ambient directory scan: {scan_calls}")
|
|
929
|
+
if "--all" in source:
|
|
930
|
+
errors.append("runtime renderer must not expose --all")
|
|
931
|
+
for marker in (
|
|
932
|
+
'add_parser("build-preregistration-artifact"',
|
|
933
|
+
'for name in ("finalize", "validate", "render")',
|
|
934
|
+
'add_argument("--page"',
|
|
935
|
+
'add_argument("--page-size"',
|
|
936
|
+
'print(f"ADVISORY_UNAVAILABLE:{exc.code}"',
|
|
937
|
+
):
|
|
938
|
+
if marker not in source:
|
|
939
|
+
errors.append(f"runtime CLI/restricted diagnostic marker missing: {marker}")
|
|
940
|
+
|
|
941
|
+
for function_name, markers in FUNCTION_SCOPED_RUNTIME_MARKERS.items():
|
|
942
|
+
function = functions.get(function_name)
|
|
943
|
+
function_source = (
|
|
944
|
+
ast.get_source_segment(source, function) if function is not None else None
|
|
945
|
+
)
|
|
946
|
+
if function_source is None:
|
|
947
|
+
errors.append(
|
|
948
|
+
f"runtime function-scoped hardened structure drifted: "
|
|
949
|
+
f"missing {function_name}"
|
|
950
|
+
)
|
|
951
|
+
continue
|
|
952
|
+
missing = [marker for marker in markers if marker not in function_source]
|
|
953
|
+
if missing:
|
|
954
|
+
errors.append(
|
|
955
|
+
f"runtime function-scoped hardened structure drifted: "
|
|
956
|
+
f"{function_name} missing {missing}"
|
|
957
|
+
)
|
|
958
|
+
continue
|
|
959
|
+
positions = tuple(function_source.index(marker) for marker in markers)
|
|
960
|
+
if positions != tuple(sorted(positions)):
|
|
961
|
+
errors.append(
|
|
962
|
+
f"runtime function-scoped hardened structure drifted: "
|
|
963
|
+
f"{function_name} marker order"
|
|
964
|
+
)
|
|
965
|
+
|
|
966
|
+
structure_markers = (
|
|
967
|
+
"class _ClosedArgumentParser(argparse.ArgumentParser):",
|
|
968
|
+
"parser = _ClosedArgumentParser(description=__doc__, allow_abbrev=False)",
|
|
969
|
+
"args = _parser().parse_args(argv)",
|
|
970
|
+
"flags |= os.O_NOFOLLOW",
|
|
971
|
+
"flags |= os.O_NONBLOCK",
|
|
972
|
+
"if not stat.S_ISREG(metadata.st_mode):",
|
|
973
|
+
"object_pairs_hook=object_pairs",
|
|
974
|
+
"parse_constant=reject_constant",
|
|
975
|
+
"parse_float=reject_float",
|
|
976
|
+
"def _strict_accepted_draft(raw: bytes) -> str:",
|
|
977
|
+
"if not text.strip():",
|
|
978
|
+
'unreadable_code="SOURCE_BINDING_INVALID"',
|
|
979
|
+
'locator = slot["document_locator"]',
|
|
980
|
+
"locator['kind']",
|
|
981
|
+
"locator['value']",
|
|
982
|
+
)
|
|
983
|
+
missing_structure = [marker for marker in structure_markers if marker not in source]
|
|
984
|
+
if missing_structure:
|
|
985
|
+
errors.append(f"runtime hardened structure drifted: {missing_structure}")
|
|
986
|
+
accepted_draft_validator = functions.get("_strict_accepted_draft")
|
|
987
|
+
accepted_draft_source = (
|
|
988
|
+
ast.get_source_segment(source, accepted_draft_validator)
|
|
989
|
+
if accepted_draft_validator is not None
|
|
990
|
+
else None
|
|
991
|
+
)
|
|
992
|
+
if (
|
|
993
|
+
accepted_draft_source is None
|
|
994
|
+
or "if not text.strip():" not in accepted_draft_source
|
|
995
|
+
or '"SOURCE_BINDING_INVALID", "accepted draft", "must not be blank"'
|
|
996
|
+
not in accepted_draft_source
|
|
997
|
+
):
|
|
998
|
+
errors.append(
|
|
999
|
+
"runtime hardened structure drifted: accepted-draft blank preflight"
|
|
1000
|
+
)
|
|
1001
|
+
try:
|
|
1002
|
+
preflight_order = tuple(
|
|
1003
|
+
source.index(marker)
|
|
1004
|
+
for marker in (
|
|
1005
|
+
"descriptor = os.open(path, flags)",
|
|
1006
|
+
"metadata = os.fstat(descriptor)",
|
|
1007
|
+
"if not stat.S_ISREG(metadata.st_mode):",
|
|
1008
|
+
"chunk = os.read(descriptor",
|
|
1009
|
+
)
|
|
1010
|
+
)
|
|
1011
|
+
if preflight_order != tuple(sorted(preflight_order)):
|
|
1012
|
+
errors.append("runtime regular-file preflight must precede every read")
|
|
1013
|
+
except ValueError:
|
|
1014
|
+
errors.append("runtime regular-file preflight structure missing")
|
|
1015
|
+
reachable = {"render_advisory", "paginate", "_markdown_inert"}
|
|
1016
|
+
queue = list(reachable)
|
|
1017
|
+
while queue:
|
|
1018
|
+
name = queue.pop()
|
|
1019
|
+
function = functions.get(name)
|
|
1020
|
+
if function is None:
|
|
1021
|
+
errors.append(f"pure renderer helper missing: {name}")
|
|
1022
|
+
continue
|
|
1023
|
+
for node in ast.walk(function):
|
|
1024
|
+
if not isinstance(node, ast.Call):
|
|
1025
|
+
continue
|
|
1026
|
+
called = _call_name(node)
|
|
1027
|
+
leaf = called.rsplit(".", 1)[-1]
|
|
1028
|
+
if leaf in functions and leaf not in reachable:
|
|
1029
|
+
reachable.add(leaf)
|
|
1030
|
+
queue.append(leaf)
|
|
1031
|
+
if leaf in PURE_RENDER_FORBIDDEN_NAMES:
|
|
1032
|
+
errors.append(f"pure renderer reaches forbidden I/O call: {called}")
|
|
1033
|
+
return errors
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
def _legacy_errors(root: Path) -> list[str]:
|
|
1037
|
+
errors: list[str] = []
|
|
1038
|
+
for relative, expected in LEGACY_HASHES.items():
|
|
1039
|
+
try:
|
|
1040
|
+
actual = hashlib.sha256((root / relative).read_bytes()).hexdigest()
|
|
1041
|
+
except OSError as exc:
|
|
1042
|
+
errors.append(f"{relative}: frozen identity unreadable: {type(exc).__name__}")
|
|
1043
|
+
continue
|
|
1044
|
+
if actual != expected:
|
|
1045
|
+
errors.append(f"{relative}: frozen legacy/template sha256 drifted")
|
|
1046
|
+
return errors
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
def _documentation_errors(root: Path) -> list[str]:
|
|
1050
|
+
errors: list[str] = []
|
|
1051
|
+
texts: dict[Path, str] = {}
|
|
1052
|
+
for relative, markers in REQUIRED_POINTERS.items():
|
|
1053
|
+
try:
|
|
1054
|
+
text = (root / relative).read_text(encoding="utf-8")
|
|
1055
|
+
texts[relative] = text
|
|
1056
|
+
except (OSError, UnicodeError) as exc:
|
|
1057
|
+
errors.append(f"{relative}: documentation unreadable: {type(exc).__name__}")
|
|
1058
|
+
continue
|
|
1059
|
+
missing = [marker for marker in markers if marker not in text]
|
|
1060
|
+
if missing:
|
|
1061
|
+
errors.append(f"{relative}: required #672 pointers missing: {missing}")
|
|
1062
|
+
claim_regions = (
|
|
1063
|
+
[text]
|
|
1064
|
+
if relative in DEDICATED_CLAIM_CEILING_DOCS
|
|
1065
|
+
else [
|
|
1066
|
+
paragraph
|
|
1067
|
+
for paragraph in re.split(r"\n\s*\n", text)
|
|
1068
|
+
if any(marker in paragraph for marker in OWNED_DOC_MARKERS)
|
|
1069
|
+
]
|
|
1070
|
+
)
|
|
1071
|
+
if any(AFFIRMATIVE_CLAIM_RE.search(region) for region in claim_regions):
|
|
1072
|
+
errors.append(
|
|
1073
|
+
f"{relative}: affirmative #672 accuracy/efficacy/coverage/clean/agreement claim"
|
|
1074
|
+
)
|
|
1075
|
+
if texts.get(ARCHITECT) != texts.get(ARCHITECT_MIRROR):
|
|
1076
|
+
errors.append("research architect mirror drifted")
|
|
1077
|
+
|
|
1078
|
+
combined_pipeline = "\n".join(
|
|
1079
|
+
texts.get(path, "")
|
|
1080
|
+
for path in (PIPELINE_SKILL, PIPELINE_ORCHESTRATOR, INTEGRITY_PROTOCOL, STATE_MACHINE)
|
|
1081
|
+
)
|
|
1082
|
+
exact_join_markers = (
|
|
1083
|
+
"input_binding.artifact.artifact_id",
|
|
1084
|
+
"artifact_sha256",
|
|
1085
|
+
"accepted_draft_artifact_id",
|
|
1086
|
+
"accepted_draft_sha256",
|
|
1087
|
+
)
|
|
1088
|
+
if any(marker not in combined_pipeline for marker in exact_join_markers):
|
|
1089
|
+
errors.append("#660/#672 exact accepted-draft ID/SHA machine join is undocumented")
|
|
1090
|
+
coexistence_markers = (
|
|
1091
|
+
"#660 first and #672 second",
|
|
1092
|
+
"writes no",
|
|
1093
|
+
"Stage 5",
|
|
1094
|
+
"revision",
|
|
1095
|
+
"stale",
|
|
1096
|
+
)
|
|
1097
|
+
if any(marker not in combined_pipeline for marker in coexistence_markers):
|
|
1098
|
+
errors.append("#660/#672 order, distinct failure, nonblocking, or stale semantics drifted")
|
|
1099
|
+
|
|
1100
|
+
semantic_docs = "\n".join(texts.get(path, "") for path in REQUIRED_POINTERS)
|
|
1101
|
+
if "consent/protocol" not in semantic_docs or "#667/#681" not in semantic_docs:
|
|
1102
|
+
errors.append("consent/protocol authority must remain an interface note to #667/#681")
|
|
1103
|
+
if "ClaimIntent" not in semantic_docs or "no score" not in semantic_docs:
|
|
1104
|
+
errors.append("ClaimIntent/no-score noninterference boundary is undocumented")
|
|
1105
|
+
return errors
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
def _heldout_errors(root: Path) -> list[str]:
|
|
1109
|
+
errors: list[str] = []
|
|
1110
|
+
heldout = root / HELDOUT_ROOT
|
|
1111
|
+
try:
|
|
1112
|
+
metadata = heldout.lstat()
|
|
1113
|
+
except OSError as exc:
|
|
1114
|
+
return [f"{HELDOUT_ROOT}: held-out status directory missing: {type(exc).__name__}"]
|
|
1115
|
+
if heldout.is_symlink() or not stat.S_ISDIR(metadata.st_mode):
|
|
1116
|
+
return [f"{HELDOUT_ROOT}: must be a real canonical directory"]
|
|
1117
|
+
entries = list(heldout.iterdir())
|
|
1118
|
+
unexpected = sorted(entry.name for entry in entries if entry.name != "README.md")
|
|
1119
|
+
if unexpected:
|
|
1120
|
+
errors.append(
|
|
1121
|
+
f"{HELDOUT_ROOT}: only canonical README.md is allowed; unexpected entries: "
|
|
1122
|
+
f"{unexpected}"
|
|
1123
|
+
)
|
|
1124
|
+
status = root / HELDOUT_STATUS
|
|
1125
|
+
try:
|
|
1126
|
+
status_metadata = status.lstat()
|
|
1127
|
+
if status.is_symlink() or not stat.S_ISREG(status_metadata.st_mode):
|
|
1128
|
+
errors.append(f"{HELDOUT_STATUS}: must be one real regular file")
|
|
1129
|
+
except OSError as exc:
|
|
1130
|
+
errors.append(f"{HELDOUT_STATUS}: canonical README unreadable: {type(exc).__name__}")
|
|
1131
|
+
return errors
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
def _ci_errors(root: Path) -> list[str]:
|
|
1135
|
+
errors: list[str] = []
|
|
1136
|
+
try:
|
|
1137
|
+
manifest = tomllib.loads((root / CI_MANIFEST).read_text(encoding="utf-8"))
|
|
1138
|
+
serialized = json.dumps(manifest, sort_keys=True)
|
|
1139
|
+
for marker in (
|
|
1140
|
+
"672-cross-document-consistency-advisory",
|
|
1141
|
+
"672-cross-document-consistency-integration",
|
|
1142
|
+
str(RUNTIME_TEST),
|
|
1143
|
+
"scripts/test_check_cross_document_consistency_advisory_integration.py",
|
|
1144
|
+
):
|
|
1145
|
+
if marker not in serialized:
|
|
1146
|
+
errors.append(f"CI manifest missing #672 marker: {marker}")
|
|
1147
|
+
except (OSError, UnicodeError, tomllib.TOMLDecodeError) as exc:
|
|
1148
|
+
errors.append(f"{CI_MANIFEST}: CI manifest unreadable: {type(exc).__name__}")
|
|
1149
|
+
try:
|
|
1150
|
+
workflow = (root / WORKFLOW).read_text(encoding="utf-8")
|
|
1151
|
+
if "check_cross_document_consistency_advisory_integration.py" not in workflow:
|
|
1152
|
+
errors.append("spec-consistency workflow missing direct #672 integration guard")
|
|
1153
|
+
except (OSError, UnicodeError) as exc:
|
|
1154
|
+
errors.append(f"{WORKFLOW}: workflow unreadable: {type(exc).__name__}")
|
|
1155
|
+
return errors
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
def run_checks(root: Path) -> list[str]:
|
|
1159
|
+
"""Return all static #672 integration errors beneath *root*."""
|
|
1160
|
+
return [
|
|
1161
|
+
*_legacy_errors(root),
|
|
1162
|
+
*_schema_errors(root),
|
|
1163
|
+
*_runtime_errors(root),
|
|
1164
|
+
*_documentation_errors(root),
|
|
1165
|
+
*_heldout_errors(root),
|
|
1166
|
+
*_ci_errors(root),
|
|
1167
|
+
]
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
def _parser() -> argparse.ArgumentParser:
|
|
1171
|
+
parser = argparse.ArgumentParser(description=__doc__, allow_abbrev=False)
|
|
1172
|
+
parser.add_argument("--root", type=Path, default=REPO_ROOT)
|
|
1173
|
+
return parser
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
def main(argv: list[str] | None = None) -> int:
|
|
1177
|
+
try:
|
|
1178
|
+
root = _parser().parse_args(argv).root.resolve()
|
|
1179
|
+
except SystemExit as exc:
|
|
1180
|
+
return int(exc.code)
|
|
1181
|
+
errors = run_checks(root)
|
|
1182
|
+
if errors:
|
|
1183
|
+
for error in errors:
|
|
1184
|
+
print(f"ERROR: {error}", file=sys.stderr)
|
|
1185
|
+
return 1
|
|
1186
|
+
print("Cross-document consistency advisory integration check passed (#672).")
|
|
1187
|
+
return 0
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
if __name__ == "__main__":
|
|
1191
|
+
raise SystemExit(main())
|