-
Notifications
You must be signed in to change notification settings - Fork 0
[T614] Require grounded path existence evidence #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,9 @@ public static EvidenceObligation derive( | |
| if (!contract.mutationAllowed() && hasProtectedExpectedTarget(contract, workspace)) { | ||
| return EvidenceObligation.PROTECTED_READ_APPROVAL_REQUIRED; | ||
| } | ||
| if (hasReadOnlyPathExistenceObligation(contract)) { | ||
| return EvidenceObligation.PATH_EXISTENCE_EVIDENCE_REQUIRED; | ||
| } | ||
| if (hasStaticWebDiagnosisObligation(contract, type)) { | ||
| return EvidenceObligation.STATIC_WEB_DIAGNOSIS_REQUIRED; | ||
| } | ||
|
|
@@ -128,6 +131,23 @@ private static boolean hasStaticWebDiagnosisObligation(TaskContract contract, Ta | |
| || lower.contains("button"); | ||
| } | ||
|
|
||
| private static boolean hasReadOnlyPathExistenceObligation(TaskContract contract) { | ||
| if (contract == null || contract.mutationAllowed() || contract.expectedTargets().isEmpty()) { | ||
| return false; | ||
| } | ||
| String request = contract.originalUserRequest(); | ||
| if (request == null || request.isBlank()) return false; | ||
| String lower = request.toLowerCase(Locale.ROOT); | ||
| boolean asksExistence = lower.contains("exists") | ||
| || lower.contains("exist") | ||
| || lower.contains("present") | ||
| || lower.contains("is there") | ||
| || lower.contains("are there"); | ||
|
Comment on lines
+144
to
+145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
With prompts such as Useful? React with 👍 / 👎. |
||
| boolean asksPathStatus = lower.contains("path") | ||
| && (lower.contains("check") || lower.contains("verify") || lower.contains("whether")); | ||
| return asksExistence || asksPathStatus; | ||
| } | ||
|
|
||
| private static boolean isStaticWebTarget(String target) { | ||
| if (target == null || target.isBlank()) return false; | ||
| String lower = target.replace('\\', '/').toLowerCase(Locale.ROOT); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For existence-only prompts where the model initially gathers no evidence, this branch now sends the target through the read-evidence handoff path;
ReadEvidenceHandoffmaps each returned target totalos.read_file. That means a question likeDoes large.log exist?can read the whole file content into the turn just to prove existence, even though the new verifier accepts parenttalos.list_direvidence. Return parent directories/list-dir handoff calls forPATH_EXISTENCE_EVIDENCE_REQUIREDto avoid unnecessary content exposure and large reads.Useful? React with 👍 / 👎.