okstra 0.228.2 → 0.229.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/docs/architecture/storage-model.md +77 -0
- package/docs/cli.md +1 -1
- package/docs/project-structure-overview.md +5 -3
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/bin/okstra-provider-exec.py +53 -4
- package/runtime/prompts/duties/code-reviewer.json +5 -2
- package/runtime/python/okstra_ctl/code_review_coverage.py +15 -4
- package/runtime/python/okstra_ctl/code_review_scope.py +2 -1
- package/runtime/python/okstra_ctl/code_review_target.py +41 -23
- package/runtime/python/okstra_ctl/conformance.py +31 -0
- package/runtime/python/okstra_ctl/execution_mutation_audit.py +100 -2
- package/runtime/python/okstra_ctl/model_io/renderers.py +10 -1
- package/runtime/python/okstra_ctl/paths.py +12 -1
- package/runtime/python/okstra_ctl/qa_commands.py +2 -1
- package/runtime/python/okstra_ctl/qa_procedures.py +60 -17
- package/runtime/python/okstra_ctl/verification_conformance.py +163 -0
- package/runtime/python/okstra_ctl/verification_generation.py +238 -0
- package/runtime/python/okstra_ctl/verification_input_types.py +21 -2
- package/runtime/python/okstra_ctl/verification_inputs.py +90 -23
- package/runtime/python/okstra_ctl/verification_target.py +13 -5
- package/runtime/skills/okstra-code-review/SKILL.md +80 -46
- package/runtime/skills/okstra-code-review/references/census-rules.md +8 -2
- package/runtime/skills/okstra-code-review/references/review-calibration.md +7 -4
- package/runtime/validators/validate-run.py +8 -33
|
@@ -181,7 +181,9 @@ from okstra_project.dirs import tasks_root as _okstra_tasks_root # noqa: E402
|
|
|
181
181
|
from okstra_project.resolver import resolve_architecture # noqa: E402
|
|
182
182
|
|
|
183
183
|
from okstra_ctl.conformance import (
|
|
184
|
+
conformance_entry_mismatches,
|
|
184
185
|
conformance_result_file,
|
|
186
|
+
conformance_script_matches as _conformance_script_matches,
|
|
185
187
|
detect_surfaces,
|
|
186
188
|
evaluate_conformance,
|
|
187
189
|
manifest_required_surfaces,
|
|
@@ -2210,27 +2212,6 @@ def _approved_plan_conformance_manifest(
|
|
|
2210
2212
|
}
|
|
2211
2213
|
|
|
2212
2214
|
|
|
2213
|
-
def _conformance_script_matches(actual: str, declared: str) -> bool:
|
|
2214
|
-
"""두 script 표기가 같은 파일을 가리키는지 판정한다.
|
|
2215
|
-
|
|
2216
|
-
1순위는 task-root 상대형끼리의 일치다. task_root 아래로 접히지 않는
|
|
2217
|
-
절대경로(예: 워크트리 경로로 적힌 선언)가 남으면, 남은 쪽이 다른 쪽을
|
|
2218
|
-
경로 경계에서 후행 일치하는지까지 본다 — `/…/wt/qa/scripts/s.ts` 와
|
|
2219
|
-
`qa/scripts/s.ts` 는 같은 파일이다. 후행 일치는 경계(`/`)를 요구하므로
|
|
2220
|
-
`renamed-stage-1.ts` 같은 다른 파일은 걸리지 않는다.
|
|
2221
|
-
"""
|
|
2222
|
-
if actual == declared:
|
|
2223
|
-
return True
|
|
2224
|
-
if not actual or not declared:
|
|
2225
|
-
return False
|
|
2226
|
-
if actual.startswith("/") != declared.startswith("/"):
|
|
2227
|
-
longer, shorter = (
|
|
2228
|
-
(actual, declared) if actual.startswith("/") else (declared, actual)
|
|
2229
|
-
)
|
|
2230
|
-
return longer.endswith("/" + shorter)
|
|
2231
|
-
return False
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
2215
|
def _declared_conformance_errors(
|
|
2235
2216
|
declared_manifest: dict,
|
|
2236
2217
|
actual_manifest: dict,
|
|
@@ -2268,23 +2249,17 @@ def _declared_conformance_errors(
|
|
|
2268
2249
|
declared_script = _normalize_conformance_script(
|
|
2269
2250
|
str(declaration.get("script") or ""), task_root
|
|
2270
2251
|
)
|
|
2271
|
-
if not _conformance_script_matches(actual_script, declared_script):
|
|
2272
|
-
errors.append(f"stage {stage_number} script mismatch")
|
|
2273
|
-
actual_requires = actual_entry.get("requires")
|
|
2274
|
-
actual_capabilities = (
|
|
2275
|
-
frozenset(actual_requires)
|
|
2276
|
-
if isinstance(actual_requires, list)
|
|
2277
|
-
and all(isinstance(value, str) for value in actual_requires)
|
|
2278
|
-
else None
|
|
2279
|
-
)
|
|
2280
2252
|
# 넓히는 것만 허용한다 — 선언보다 많은 capability 는 더 엄격한 검증이다.
|
|
2281
2253
|
# 승인된 계획이 `requires` 를 좁게 적고 그 stage 의 diff 가 다른 표면을
|
|
2282
2254
|
# 건드리면, diff-surface 대조는 넓힐 것을 요구하는데 정확 일치는 그것을
|
|
2283
2255
|
# 거절해 같은 계획으로는 통과할 입력이 없었다(2026-09-22 dev-10860
|
|
2284
2256
|
# Stage 1). 좁히는 것은 선언한 검증을 빼는 것이므로 여전히 불일치다.
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2257
|
+
for error in conformance_entry_mismatches(
|
|
2258
|
+
actual_script=actual_script, declared_script=declared_script,
|
|
2259
|
+
actual_requires=actual_entry.get("requires"),
|
|
2260
|
+
declared_requires=frozenset(declaration.get("requires") or []),
|
|
2261
|
+
):
|
|
2262
|
+
errors.append(f"stage {stage_number} {error}")
|
|
2288
2263
|
# 계획이 면제한 stage 에 구현이 실제 Tier 3 항목을 붙이는 것은 허용한다 —
|
|
2289
2264
|
# 면제 stage 의 diff 가 db/io/http/external 표면을 건드려 diff-surface 대조에
|
|
2290
2265
|
# 걸렸을 때, 승인된 계획은 불변이므로 그 항목이 유일한 진행 경로다
|