GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — improvement(provenance): name every guard that can latch a registry by icecrasher321 · Pull Request #6513 · simstudioai/sim

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Better logs for provenance failures

Type of Change

  • Other: Logs

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Vikhyath Mondreti and others added 3 commits August 10, 2026 15:52
Vikhyath Mondreti @claude
fix(provenance): name every guard that can latch a registry
fde7c6b
A production latch reported `reason: "unspecified"` because 44 call sites took
the default. The reason is the only thing that names which guard tripped, and a
refusal surfaces many frames later as one fixed sentence, so an unnamed latch is
undiagnosable — that is what left an incident's origin unidentified for a day.

Give each call site a literal that names its guard, add the 20 new literals to
the reason union, and sort them into the existing error/warn split: a guard that
should not trip on a healthy run reports at error, everything else stays at warn.
`log-creation-skipped` joins the by-design set since it fires on every run that
does not persist a log.

Make `reason` required on both `markIncomplete` and `markInputPathIncomplete`, so
omission is a compile error rather than a silent `unspecified`. A caller with
genuinely nothing to say now passes `'unspecified'` where a reviewer can see it.

The three remaining bare calls are on ResolvedSecretTraceProvenanceAccumulator,
a different class with no reason concept.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Vikhyath Mondreti @claude
test(provenance): pin the new reasons and the guard that latched in p…
adb60d0
…roduction

Cover what the reason set is for rather than only that it compiles: the
non-enumerable tool-params branch now asserts it names `tool-input-not-enumerable`,
which is the guard the production logs showed reporting `unspecified`, and every
new literal asserts which stream it reports on — error for a guard that cannot
trip on a healthy run, warn for one reachable without a fault, silent for the
by-design log-less session.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Vikhyath Mondreti @claude
refactor(provenance): make reason the only locator, not one of two
edca07c
Two fields had grown into competing answers to the same question. `origin` is a
free-form label for which importer accepted an already-incomplete bundle; four
latches had started passing `markIncomplete('unspecified', { origin })`, using it
to stand in for a reason that did not exist yet. That splits one fact across a
closed enum and an open string, leaving neither worth alerting on.

Give those four the literal they were reaching for — none needed a new one — and
split the five reasons that covered genuinely different guards, so the reason
alone locates the site rather than needing an origin beside it. `origin` keeps its
narrow job, now documented: it disambiguates importers that share one guard, and a
latch that wants an origin because no reason fits should add a reason instead.

No production call site passes 'unspecified' any more.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@vercel

vercel Bot commented Aug 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 11, 2026 1:03am

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Aug 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches secret provenance fail-closed paths across executor, copilot, and APIs; behavior is mostly diagnostic, but wrong reason classification could hide real faults in warn logs or flood errors on hot paths.

Overview
Resolved secret trace registries must now pass an explicit reason when marked incomplete—markIncomplete() no longer defaults to unspecified, so production latches name the guard that tripped instead of an untraceable generic state.

The change wires specific reason literals through knowledge search, memory/knowledge provenance APIs, mothership execution, generic block input projection, copilot client tools (seal/completion/workflow restore), table backfill, logging sessions, and tool param enumeration—replacing bare markIncomplete() calls across those paths.

ResolvedSecretTraceRegistry grows a closed reason taxonomy and splits logging: error for faults that should not happen on a healthy run (e.g. tool-input-not-enumerable, mothership-provenance-invalid, backfill-checkpoint-unusable), warn for expected or capacity-driven incompleteness (e.g. knowledge-result-provenance-unavailable, client-tool-seal-absent, backfill-checkpoint-absent to avoid backfill log floods), and silent for by-design cases (log-creation-skipped, constructed-incomplete). Tests pin which reasons land at each level.

Reviewed by Cursor Bugbot for commit f4ac6a1. Configure here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes provenance-registry latches explicitly name their cause and classifies those causes for clearer warning/error diagnostics.

  • Requires every ResolvedSecretTraceRegistry.markIncomplete call to provide a reason.
  • Adds named reasons across knowledge, memory, workflow, copilot, tool, table, and Mothership paths.
  • Adds tests for fault, expected-incompleteness, and intentionally silent diagnostic categories.

Confidence Score: 5/5

The PR appears safe to merge because it improves provenance diagnostics without weakening or changing the registry’s fail-closed behavior.

All current latch callers provide explicit reasons, and reason classification changes only logging severity while preserving completeness, propagation, and refusal semantics.

Important Files Changed

Filename Overview
apps/sim/executor/utils/resolved-secret-trace-registry.ts Expands the closed reason taxonomy, requires explicit latch reasons, and classifies reasons for diagnostic severity without changing fail-closed semantics.
apps/sim/lib/copilot/request/tools/client.ts Names client-tool sealing, completion, trust, content, and provenance-import failure paths.
apps/sim/executor/handlers/mothership/mothership-handler.ts Attributes invalid, unreadable, and missing Mothership provenance across buffered and streaming responses.
apps/sim/lib/knowledge/secret-provenance.ts Distinguishes knowledge provenance capacity, missing-row, and content-mismatch failures.
apps/sim/tools/index.ts Names the non-enumerable tool-input guard and adds regression coverage for getter-backed parameters.
apps/sim/lib/logs/execution/logging-session.ts Separates untrusted restored provenance from intentionally skipped log creation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Guard[Provenance guard fails] --> Mark[markIncomplete with named reason]
  Mark --> Latch[Registry becomes incomplete]
  Mark --> Classify{Reason category}
  Classify -->|Originating fault| Error[Error diagnostic]
  Classify -->|Expected incompleteness| Warn[Warning diagnostic]
  Classify -->|By design| Silent[No diagnostic]
  Latch --> Refusal[Existing fail-closed projection and import behavior]
Loading

Reviews (1): Last reviewed commit: "refactor(provenance): make reason the on..." | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 11, 2026
View reviewed changes
Comment thread apps/sim/executor/utils/resolved-secret-trace-registry.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Vikhyath Mondreti @claude
fix(provenance): stop two expected states from reporting as faults
f4ac6a1
Cursor Bugbot caught `backfill-checkpoint-*`: the guard covered four conditions
under one reason classified as an originating fault, and one of them — a state
persisted before the checkpoint contract existed — is what essentially every
legacy row looks like. A backfill over historical rows would have put one error
line per row into the stream the error/warn split exists to protect.

Auditing the rest of the error-level reasons for the same shape found a second:
a client tool invoked without a run id has no binding to unseal against, so it
took the `[null, null]` path and reported `client-tool-seal-failed` at error on an
ordinary configuration.

Split both along the line that matters — absent versus unusable, not attempted
versus failed — and classify each half: expected states warn, genuine faults keep
error. `backfill-scope-mismatch` is retired; it named one of its four conditions.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@vercel
vercel Bot temporarily deployed to Preview August 11, 2026 01:03 Inactive
@icecrasher321

icecrasher321 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 11, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f4ac6a1. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@icecrasher321
icecrasher321 merged commit 4bafd14 into staging Aug 11, 2026
29 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 deleted the fix/name-every-provenance-latch branch August 11, 2026 03:12
@waleedlatif1 waleedlatif1 mentioned this pull request Aug 11, 2026
v0.8.0: new workflow UI, v2 API, salesforce JWT, provenance improvements, incidentio tools, block retries #6533
Closed
This was referenced Aug 11, 2026
feat(blog): Tracking Secrets Through an Agent Run #6558
Merged
improvement(provenance): make the incompleteness reason set closed and complete #6559
Merged
@waleedlatif1 waleedlatif1 mentioned this pull request Aug 12, 2026
v0.8.0: desktop app, workflow UI, v2 endpoints #6606
Merged

This branch was previously deployed

1 inactive deployment
Preview — f4ac6a1e Deployed Aug 11, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@icecrasher321
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.