okstra 0.209.1 → 0.209.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okstra",
3
- "version": "0.209.1",
3
+ "version": "0.209.2",
4
4
  "description": "Host-aware multi-provider cross-verification orchestrator runtime and agent skills.",
5
5
  "license": "MIT",
6
6
  "author": "devonshin",
@@ -1,5 +1,5 @@
1
1
  {
2
- "package": "0.209.1",
3
- "builtAt": "2026-10-05T05:18:06.904Z",
2
+ "package": "0.209.2",
3
+ "builtAt": "2026-10-05T05:48:33.643Z",
4
4
  "repoRoot": "/home/runner/work/okstra/okstra"
5
5
  }
@@ -115,6 +115,7 @@ from .seeding import installed_version
115
115
  from .worker_audit_ledger import (
116
116
  check_worker_results_audit,
117
117
  parse_worker_result_name,
118
+ result_file_audit_failures,
118
119
  )
119
120
  from .worker_artifacts import worker_provider_id
120
121
  from .worker_prompt_body import REPORT_WRITER_WORKER_ID
@@ -122,7 +123,7 @@ from .worker_prompt_headers import (
122
123
  WorkerPromptHeaderError,
123
124
  resolve_errors_log_path,
124
125
  )
125
- from .worker_artifact_paths import audit_sidecar_rel
126
+ from .worker_artifact_paths import WorkerArtifactPathError, audit_sidecar_rel
126
127
  from .wrapper_status import (
127
128
  log_path_for_prompt,
128
129
  mutation_snapshot_path_for_prompt,
@@ -2732,11 +2733,16 @@ def _audit_sidecar_failures(job: WorkerJob) -> tuple[str, ...]:
2732
2733
  """
2733
2734
  parsed = parse_worker_result_name(job.worker_result_path.name)
2734
2735
  if parsed is None:
2735
- return (
2736
- f"worker result `{job.worker_result_path.name}` is not a canonical "
2737
- f"`<role>-worker-<task-type>-<seq>.md` name, so the audit-sidecar "
2738
- f"contract could not be checked",
2739
- )
2736
+ # reverify·critic 결과는 `<role>-worker-reverify-r<N>-…` 처럼 run 단위
2737
+ # 스캔이 못 읽는 이름이다. 사이드카 이름은 같은 규칙으로 나오므로 이 파일만 본다.
2738
+ try:
2739
+ audit_path = Path(audit_sidecar_rel(str(job.worker_result_path)))
2740
+ except WorkerArtifactPathError:
2741
+ return (
2742
+ f"worker result `{job.worker_result_path.name}` has no "
2743
+ f"`-worker-` token, so the audit-sidecar contract could not be checked",
2744
+ )
2745
+ return tuple(result_file_audit_failures(job.worker_result_path, audit_path))
2740
2746
  return tuple(
2741
2747
  check_worker_results_audit(
2742
2748
  job.worker_result_path.parent.parent,
@@ -344,6 +344,36 @@ def worker_result_files(
344
344
  yield path, match.worker_role, match.seq
345
345
 
346
346
 
347
+ def result_file_audit_failures(result_path: Path, audit_path: Path) -> list[str]:
348
+ """The blocking audit-sidecar findings for one worker result and its sidecar."""
349
+ rel = result_path.name
350
+ try:
351
+ content = result_path.read_text()
352
+ except OSError as exc:
353
+ return [f"worker-results file unreadable: {rel} ({exc})"]
354
+ failures: list[str] = []
355
+ if READING_CONFIRMATION_HEADING_RE.search(content) is not None:
356
+ failures.append(
357
+ f"worker-results file `{rel}` contains a `## 0. Reading "
358
+ f"Confirmation` heading — that block moved to the audit "
359
+ f"sidecar (`{audit_path.name}`). "
360
+ f"Remove the §0 heading + body from the main file and "
361
+ f"write a fresh sidecar."
362
+ )
363
+ if not audit_path.exists():
364
+ worker_role = rel.partition("-worker-")[0] + "-worker"
365
+ failures.append(
366
+ f"worker `{worker_role}` produced `{rel}` but no audit sidecar "
367
+ f"at `{audit_path.name}` — the sidecar must carry the Reading "
368
+ f"Confirmation block (one short line per input file). Workers "
369
+ f"write this in the same step as the main worker-results file."
370
+ )
371
+ return failures
372
+ _, command_failures = read_evidence_commands(audit_path)
373
+ failures.extend(command_failures)
374
+ return failures
375
+
376
+
347
377
  def check_worker_results_audit(
348
378
  run_dir: Path,
349
379
  task_type: str,
@@ -399,36 +429,17 @@ def worker_results_audit_findings(
399
429
 
400
430
  for path, worker_role, result_seq in worker_result_files(run_dir, task_type, seq, worker):
401
431
  rel = path.name
402
- try:
403
- content = path.read_text()
404
- except OSError as exc:
405
- failures.append(f"worker-results file unreadable: {rel} ({exc})")
406
- continue
407
-
408
- if READING_CONFIRMATION_HEADING_RE.search(content) is not None:
409
- failures.append(
410
- f"worker-results file `{rel}` contains a `## 0. Reading "
411
- f"Confirmation` heading — that block moved to the audit "
412
- f"sidecar (`{worker_role}-audit-{task_type}-{result_seq}.md`). "
413
- f"Remove the §0 heading + body from the main file and "
414
- f"write a fresh sidecar."
415
- )
416
-
417
432
  audit_path = (
418
433
  run_dir / "worker-results"
419
434
  / f"{worker_role}-audit-{task_type}-{result_seq}.md"
420
435
  )
436
+ failures.extend(result_file_audit_failures(path, audit_path))
437
+ try:
438
+ content = path.read_text()
439
+ except OSError:
440
+ continue
421
441
  if not audit_path.exists():
422
- failures.append(
423
- f"worker `{worker_role}` produced `{rel}` but no audit sidecar "
424
- f"at `{audit_path.name}` — the sidecar must carry the Reading "
425
- f"Confirmation block (one short line per input file). Workers "
426
- f"write this in the same step as the main worker-results file."
427
- )
428
442
  continue
429
-
430
- _, command_failures = read_evidence_commands(audit_path)
431
- failures.extend(command_failures)
432
443
  advisories.extend(_evidence_read_ledger_failures(
433
444
  run_dir=run_dir,
434
445
  worker_role=worker_role,