Skip to content

fix(proof): fail closed on incomplete harbor evaluate - #267

Merged
echobt merged 1 commit into
mainfrom
cursor/harbor-evaluate-p1-fail-closed-750d
Sep 10, 2026
Merged

echobt merged 1 commit into
mainfrom
cursor/harbor-evaluate-p1-fail-closed-750d

Conversation

@echobt

@echobt echobt commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to squash-merged #266 (41b51ac). That merge landed before the Greptile P1 fail-closed commit. This PR is the same fix, rebased onto main.

T-Rex-verified P1s on the Harbor evaluate adaptor:

  1. Partial failures are scored — nonzero Harbor exit does not write report.json; summarize.py also refuses harbor_exit != 0.
  2. Trial cap changes scores — every measured trial is scored; only serialized evidence is capped at 256.
  3. Incomplete scans pass — file/byte-limit truncation marks the scan incomplete and fails off-limits rules.
  4. Import path escapes artifactmodule:Class is resolved in the evaluate import env (artefact parent only) and rejected when the origin is outside the staged artefact.
  5. Unknown rules pass — unsupported rule IDs fail closed even when an artefact directory exists.
  6. Skipped files bypass checks (new on this PR) — oversized, unreadable (stat/read OSError), or binary regular files mark the scan incomplete so off-limits rules cannot pass on uninspected contents.

Owner semantics unchanged: Harbor -a is an import path; evaluate FAIL CLOSED without an agent at $PROOF_ARTIFACT_DIR/agent or …/recipe/agent; miner BYOK required (no owner-key fallback); terminus-2 only for baseline with no miner artefact.

Greptile

Every PR is reviewed by Greptile before merge. Config: .greptile/.

  • Greptile has reviewed this PR; findings are fixed or answered
  • @greptileai posted after each push

Test plan

  • deploy/guest/runners/rlm_fc_in_guest_harbor/tests/run.sh including P1 regressions (nonzero Harbor exit, 260-trial mean vs evidence cap, truncated off-limits scan, unknown rule id, escaped import_path, oversized/unreadable/binary skipped files)
  • cargo run -p xtask -- external-docs-check
  • cargo test --workspace (adaptor-only change; CI)
  • cargo fmt --all -- --check (CI)
  • Clippy / deny / xtask gates if this PR touches crates they cover

Risk

Operators must re-bake or replace the live Harbor adaptor for scoring to change. No BASE_* env, deployed path, or crypto domain tag changes.

Naming

I did not rename BASE_* environment variables, deployed host paths
(/opt/base, /run/base, …), GHCR baseintelligence/base package names, or
base-*-v1 cryptographic domain tags, unless this PR’s purpose is a coordinated
cutover documented in docs/NAMING.md.

Open in Web Open in Cursor 

Reject nonzero Harbor exits, score every measured trial, fail truncated
off-limits scans and unknown inspect rules, and refuse import paths whose
origin is outside the staged artefact.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
@cursor

cursor Bot commented Sep 10, 2026

Copy link
Copy Markdown

@greptileai

@echobt

echobt commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai

@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown

Greptile Summary

This update continues to harden the Harbor proof adaptor so incomplete evaluation or inspection results fail closed, score evidence is derived consistently, and staged agent resolution remains constrained to the submitted artefact.

Confidence Score: 5/5

No blocking issues remain in scope.

There are no accepted new findings and no outstanding prior-review findings to score.

Reviews (2): Last reviewed commit: "fix(proof): fail closed on incomplete ha..." | Re-trigger Greptile

@echobt
echobt merged commit 5efc405 into main Sep 10, 2026
5 checks passed
@echobt
echobt deleted the cursor/harbor-evaluate-p1-fail-closed-750d branch September 10, 2026 11:36
@cursor

cursor Bot commented Sep 10, 2026

Copy link
Copy Markdown

@greptileai

@cursor

cursor Bot commented Sep 10, 2026

Copy link
Copy Markdown

@greptileai

#267 was squash-merged at 5efc405d before the skipped-file fail-closed commit. That fix is on follow-up #269.

@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown

Understood. Since #267 was squash-merged before the skipped-file fail-closed change, that finding is not addressed in #267; I’ll treat #269 as the follow-up carrying the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants