Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Python coverage is experimental and degraded-honest. Graph-backed structure, unt

## Findings

Findings are named signals such as `typescript.type_errors`, `rust.source_hygiene`, `python.syntax`, `python.source-hygiene`, `python.types`, `python.import-graph`, `python.dead-code`, `python.relevant-tests`, and `coverage.unsupported_stacks`. Counts come from validation diagnostics, graph evidence when available, optional-tool degradation, and repository census data. Opcore does not blend them into a single rating.
Findings are named signals such as `typescript.type_errors`, `rust.source_hygiene`, `python.syntax`, `python.source-hygiene`, `python.types`, `python.import-graph`, `python.dead-code`, `python.relevant-tests`, `python.pytest`, and `coverage.unsupported_stacks`. Counts come from validation diagnostics, graph evidence when available, optional-tool degradation, and repository census data. Opcore does not blend them into a single rating.

## Artifacts

Expand Down
114 changes: 113 additions & 1 deletion packages/contracts/schemas/opcore-contracts.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2394,7 +2394,19 @@
"properties": {
"schemaId": { "const": "opcore.python.project-context.v1" },
"schemaVersion": { "const": 1 },
"target": { "allOf": [{ "$ref": "#/$defs/RepoRelativePath" }, { "pattern": "\\.pyi?$" }] },
"target": {
"allOf": [
{ "$ref": "#/$defs/RepoRelativePath" },
{
"anyOf": [
{ "pattern": "\\.pyi?$" },
{
"pattern": "(^|/)(pyproject\\.toml|Pipfile|Pipfile\\.lock|poetry\\.lock|pdm\\.lock|uv\\.lock|setup\\.cfg|setup\\.py|pytest\\.ini|tox\\.ini|pyrightconfig\\.json|ruff\\.toml|\\.ruff\\.toml|mypy\\.ini|\\.mypy\\.ini|conftest\\.py|requirements.*\\.txt)$"
}
]
}
]
},
"repositoryRoot": { "type": "string", "minLength": 1 },
"projectRoot": { "$ref": "#/$defs/PythonProjectRoot" },
"projectBoundary": { "$ref": "#/$defs/PythonProjectRoot" },
Expand Down Expand Up @@ -2548,6 +2560,102 @@
}
]
},
"PythonCapabilityCounts": {
"type": "object",
"additionalProperties": false,
"required": [
"candidateCount",
"collectedCount",
"executedCount",
"passedCount",
"failedCount",
"skippedCount",
"xfailedCount",
"xpassedCount",
"errorCount"
],
"properties": {
"candidateCount": { "type": "integer", "minimum": 0 },
"collectedCount": { "type": "integer", "minimum": 0 },
"executedCount": { "type": "integer", "minimum": 0 },
"passedCount": { "type": "integer", "minimum": 0 },
"failedCount": { "type": "integer", "minimum": 0 },
"skippedCount": { "type": "integer", "minimum": 0 },
"xfailedCount": { "type": "integer", "minimum": 0 },
"xpassedCount": { "type": "integer", "minimum": 0 },
"errorCount": { "type": "integer", "minimum": 0 }
}
},
"PythonCapabilityCleanupEvidence": {
"type": "object",
"additionalProperties": false,
"required": ["attempted", "ok"],
"properties": {
"attempted": { "type": "boolean" },
"ok": { "type": "boolean" },
"failureMessage": { "type": "string", "minLength": 1 }
}
},
"PythonCapabilityInvocation": {
"type": "object",
"additionalProperties": false,
"required": [
"stage",
"command",
"argsDigest",
"argCount",
"selectionMode",
"durationMs",
"termination",
"outputBytes"
],
"properties": {
"stage": { "enum": ["collection", "execution"] },
"command": { "type": "string", "minLength": 1 },
"argsDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
"argCount": { "type": "integer", "minimum": 0 },
"selectionMode": { "enum": ["none", "direct_argv", "manifest"] },
"selectionDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
"durationMs": { "type": "number", "minimum": 0 },
"termination": { "enum": ["exited", "timeout", "signal", "spawn_error"] },
"exitCode": { "type": "integer", "minimum": 0 },
"signal": { "type": "string", "minLength": 1 },
"outputBytes": { "type": "integer", "minimum": 0 },
"stdoutDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
"stderrDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
}
},
"PythonValidationCapabilityRun": {
"type": "object",
"additionalProperties": false,
"required": ["capability", "checkId", "activation", "outcome", "message"],
"properties": {
"capability": { "const": "pytest" },
"checkId": { "$ref": "#/$defs/ValidationCheckId" },
"activation": { "enum": ["enabled", "disabled", "not_applicable"] },
"outcome": { "type": "string", "minLength": 1 },
"message": { "type": "string", "minLength": 1 },
"projectKey": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
"projectRoot": { "$ref": "#/$defs/RepoRelativePath" },
"configFile": { "$ref": "#/$defs/RepoRelativePath" },
"targetCount": { "type": "integer", "minimum": 0 },
"candidatePaths": {
"type": "array",
"items": { "$ref": "#/$defs/RepoRelativePath" }
},
"collectedNodeIds": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"afterStateFingerprint": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
"selectionMode": { "enum": ["none", "direct_argv", "manifest"] },
"selectionDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
"counts": { "$ref": "#/$defs/PythonCapabilityCounts" },
"collection": { "$ref": "#/$defs/PythonCapabilityInvocation" },
"execution": { "$ref": "#/$defs/PythonCapabilityInvocation" },
"cleanup": { "$ref": "#/$defs/PythonCapabilityCleanupEvidence" }
}
},
"ValidationResult": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -2760,6 +2868,10 @@
"type": "array",
"items": { "$ref": "#/$defs/PythonProjectContext" }
},
"pythonCapabilityRuns": {
"type": "array",
"items": { "$ref": "#/$defs/PythonValidationCapabilityRun" }
},
"manifest": {
"type": "object",
"additionalProperties": false,
Expand Down
Loading