René's URL Explorer Experiment


Title: Refuse a granted run whose agent record can't be saved with PRECONDITION by shipmill-romamo[bot] · Pull Request #491 · cloudfall-dev/cloudfall · GitHub

Open Graph Title: Refuse a granted run whose agent record can't be saved with PRECONDITION by shipmill-romamo[bot] · Pull Request #491 · cloudfall-dev/cloudfall

X Title: Refuse a granted run whose agent record can't be saved with PRECONDITION by shipmill-romamo[bot] · Pull Request #491 · cloudfall-dev/cloudfall

Description: Plan Serves: quality bar (Q-1) Files: sdk/src/cloudfall/agent_gate.py, sdk/src/cloudfall/app.py, sdk/src/cloudfall/operator.py, sdk/tests/test_s018_granted_run.py, changelog.d/489-granted-record-save-error.md Order: failing tests first (a same-second identical call is refused, naming the existing record; an unwritable store exits PRECONDITION naming the folder, with no step started; a settle that can't save keeps the run's own error), then RecordNotSavedError in GrantedRun, then _granted mapping it to PRECONDITION Proof: uv run pytest sdk/tests/test_s018_granted_run.py sdk/tests/test_s018_agent_gate.py sdk/tests/test_operator.py, uv run ruff check ., uv run mypy Summary When the proposal store couldn't save a granted MCP run's agent record, the OperatorError (id already held) or OSError (folder unwritable) from GrantedRun.begin escaped the call as an internal error. Now: GrantedRun.begin raises RecordNotSavedError (an OperatorError), coded agent_record_exists (with the existing record's id and path) or agent_record_unwritable (with the store folder). settle and fail turn an OSError on update into the same error _granted turns it into PRECONDITION with no traceback, as D-5 does for agent investigate. The first save happens in the wrapped step runner before the first step, so a refused call starts no engine step and runs nothing A same-second identical call is refused, not given another id. The first run may still be running, so refusing keeps one record per call and stops an accidental double run. It also leaves the op-- id format that cloudfall why, the operator and the schema's id pattern read as it is. The agent can read the named record and call again A record that can't be settled after the run started (fail in _granted's finally) no longer masks the run's own error: that error propagates, with a note naming the record that wasn't written ERROR_PROPOSAL_EXISTS in operator.py is now public (it was _ERROR_PROPOSAL_EXISTS), so the gate can tell a collision from other store errors Test plan New in sdk/tests/test_s018_granted_run.py, each failing on main for the reason in the issue: test_a_same_second_identical_call_refuses_naming_the_existing_record: records for the call's ids over the next 5 seconds are already there; the call exits PRECONDITION with agent_record_exists, names one of them, starts no step and leaves them as they were test_a_store_folder_that_cannot_be_written_exits_precondition_naming_it: a file in the store folder's place; PRECONDITION with agent_record_unwritable, the folder named, no step started (a file rather than chmod, so it holds under root too) test_a_failed_save_after_the_run_started_keeps_the_runs_own_error: the folder goes away after the first step and the run raises; the run's OSError propagates with a note naming the store folder uv run pytest sdk/tests/test_s018_granted_run.py sdk/tests/test_s018_agent_gate.py sdk/tests/test_operator.py: 105 passed uv run ruff check . and uv run mypy: clean The full suite was left to CI Fixes #489 🤖 Generated with Claude Code

Open Graph Description: Plan Serves: quality bar (Q-1) Files: sdk/src/cloudfall/agent_gate.py, sdk/src/cloudfall/app.py, sdk/src/cloudfall/operator.py, sdk/tests/test_s018_granted_run.py, changelog.d/489-granted-record-s...

X Description: Plan Serves: quality bar (Q-1) Files: sdk/src/cloudfall/agent_gate.py, sdk/src/cloudfall/app.py, sdk/src/cloudfall/operator.py, sdk/tests/test_s018_granted_run.py, changelog.d/489-granted-record-s...

Opengraph URL: https://github.com/cloudfall-dev/cloudfall/pull/491

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e0c251e4-b374-6d05-ed04-dc61413aad7d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBBFA:2ACC63:262140A:3245F07:6B05578B
html-safe-nonce0494bb059608a59b4503dad70b70fb6c23ba5e948283d956fd2233ac1b56bba0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkZBOjJBQ0M2MzoyNjIxNDBBOjMyNDVGMDc6NkIwNTU3OEIiLCJ2aXNpdG9yX2lkIjoiMjMzNTUwMDMzNTcxMzcwMzgxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6e815704256c41d703eaf72b68c6e371e90031602ee24ae4be48d158210be9a4
hovercard-subject-tagpull_request:5356330371
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/cloudfall-dev/cloudfall/pull/491/files
twitter:imagehttps://avatars.githubusercontent.com/u/5600783?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/5600783?s=400&v=4
og:image:altPlan Serves: quality bar (Q-1) Files: sdk/src/cloudfall/agent_gate.py, sdk/src/cloudfall/app.py, sdk/src/cloudfall/operator.py, sdk/tests/test_s018_granted_run.py, changelog.d/489-granted-record-s...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonea79a02b7e7546ea306864e922ed2103ef4c04fac63168e11c2b2d4d816793080
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/cloudfall-dev/cloudfall git https://github.com/cloudfall-dev/cloudfall.git
octolytics-dimension-user_id339512759
octolytics-dimension-user_logincloudfall-dev
octolytics-dimension-repository_id1360999777
octolytics-dimension-repository_nwocloudfall-dev/cloudfall
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1360999777
octolytics-dimension-repository_network_root_nwocloudfall-dev/cloudfall
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release10dff83edfd4f3617a7792a152d44991587b434c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/cloudfall-dev/cloudfall/pull/491/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcloudfall-dev%2Fcloudfall%2Fpull%2F491%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcloudfall-dev%2Fcloudfall%2Fpull%2F491%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=cloudfall-dev%2Fcloudfall
Reloadhttps://github.com/cloudfall-dev/cloudfall/pull/491/files
Reloadhttps://github.com/cloudfall-dev/cloudfall/pull/491/files
Reloadhttps://github.com/cloudfall-dev/cloudfall/pull/491/files
cloudfall-devhttps://github.com/cloudfall-dev
cloudfallhttps://github.com/cloudfall-dev/cloudfall
Codehttps://github.com/cloudfall-dev/cloudfall
Issues78 (78)https://github.com/cloudfall-dev/cloudfall/issues
Pull requests10 (10)https://github.com/cloudfall-dev/cloudfall/pulls
Discussionshttps://github.com/cloudfall-dev/cloudfall/discussions
Actionshttps://github.com/cloudfall-dev/cloudfall/actions
Security and qualityhttps://github.com/cloudfall-dev/cloudfall/security
Insightshttps://github.com/cloudfall-dev/cloudfall/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fcloudfall-dev%2Fcloudfall%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcloudfall-dev%2Fcloudfall%2Fissues%2Fnew%2Fchoose
shipmill-romamohttps://github.com/apps/shipmill-romamo
mainhttps://github.com/cloudfall-dev/cloudfall/tree/main
fix/489-granted-record-save-errorhttps://github.com/cloudfall-dev/cloudfall/tree/fix/489-granted-record-save-error
Conversation 1 https://github.com/cloudfall-dev/cloudfall/pull/491
Commits 5 https://github.com/cloudfall-dev/cloudfall/pull/491/commits
Checks 2 https://github.com/cloudfall-dev/cloudfall/pull/491/checks
Files changed 6 https://github.com/cloudfall-dev/cloudfall/pull/491/files
Refuse a granted run whose agent record can't be saved with PRECONDITION https://github.com/cloudfall-dev/cloudfall/pull/491/files#top
Show all changes 5 commits https://github.com/cloudfall-dev/cloudfall/pull/491/files
87ef8bc Refuse a granted run whose agent record can't be saved with PRECONDITION shipmill-romamo[bot] Nov 17, 2026 https://github.com/cloudfall-dev/cloudfall/pull/491/commits/87ef8bc13f70c2a184033e34bf7a777c6d980400
76ee3d1 Say a granted run completed when only its settled record is lost shipmill-romamo[bot] Nov 17, 2026 https://github.com/cloudfall-dev/cloudfall/pull/491/commits/76ee3d1b0bde711c08bf9d69c61e137175d2cc5f
71c4075 Never record a verified granted run failed after its settle is lost shipmill-romamo[bot] Nov 17, 2026 https://github.com/cloudfall-dev/cloudfall/pull/491/commits/71c40753d0a94698f4e787146c3f60ef83e9bd21
8516a3e Prove a person-approved run's lost record exits PRECONDITION too shipmill-romamo[bot] Nov 17, 2026 https://github.com/cloudfall-dev/cloudfall/pull/491/commits/8516a3e91a035375ff80c29509f7cbe26f077ae9
0013263 Use the public ERROR_PROPOSAL_EXISTS in the agent propose path shipmill-romamo[bot] Nov 17, 2026 https://github.com/cloudfall-dev/cloudfall/pull/491/commits/00132639b138fc00f0401f38f6b49b29949f9fa2
Clear filters https://github.com/cloudfall-dev/cloudfall/pull/491/files
Please reload this pagehttps://github.com/cloudfall-dev/cloudfall/pull/491/files
Please reload this pagehttps://github.com/cloudfall-dev/cloudfall/pull/491/files
489-granted-record-save-error.md https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-1af103bac0bc16bb80ba48a897b229088327fef639a7fabb803b34047293beee
agent_gate.py https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
app.py https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-80944e9d32bf3de16b8f897a076d9413719c085027f33cffff3fd7b0358d8763
operator.py https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-6faa937f971ec0e078b7052accac7450a634497425b6a987966275a596c9bfd7
test_s018_agent_approve.py https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-36fd0064676efbbeb0d12b024cd6f75386ed51987a9c9f10e2d16db8556151d4
test_s018_granted_run.py https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-e5c0faf3af6c0aa2e7e93a2dcab10957e1da6f54c9fe160638ca3c480b8c534c
changelog.d/489-granted-record-save-error.mdhttps://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-1af103bac0bc16bb80ba48a897b229088327fef639a7fabb803b34047293beee
View file https://github.com/cloudfall-dev/cloudfall/blob/00132639b138fc00f0401f38f6b49b29949f9fa2/changelog.d/489-granted-record-save-error.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/491/{{ revealButtonHref }}
sdk/src/cloudfall/agent_gate.pyhttps://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
View file https://github.com/cloudfall-dev/cloudfall/blob/00132639b138fc00f0401f38f6b49b29949f9fa2/sdk/src/cloudfall/agent_gate.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/491/{{ revealButtonHref }}
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-bda2a192ff1307dc3ea6d35568a0b94441cb622b16b2f7458492d83a853d58a2
sdk/src/cloudfall/app.pyhttps://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-80944e9d32bf3de16b8f897a076d9413719c085027f33cffff3fd7b0358d8763
View file https://github.com/cloudfall-dev/cloudfall/blob/00132639b138fc00f0401f38f6b49b29949f9fa2/sdk/src/cloudfall/app.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/491/{{ revealButtonHref }}
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-80944e9d32bf3de16b8f897a076d9413719c085027f33cffff3fd7b0358d8763
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-80944e9d32bf3de16b8f897a076d9413719c085027f33cffff3fd7b0358d8763
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-80944e9d32bf3de16b8f897a076d9413719c085027f33cffff3fd7b0358d8763
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-80944e9d32bf3de16b8f897a076d9413719c085027f33cffff3fd7b0358d8763
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-80944e9d32bf3de16b8f897a076d9413719c085027f33cffff3fd7b0358d8763
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-80944e9d32bf3de16b8f897a076d9413719c085027f33cffff3fd7b0358d8763
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-80944e9d32bf3de16b8f897a076d9413719c085027f33cffff3fd7b0358d8763
sdk/src/cloudfall/operator.pyhttps://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-6faa937f971ec0e078b7052accac7450a634497425b6a987966275a596c9bfd7
View file https://github.com/cloudfall-dev/cloudfall/blob/00132639b138fc00f0401f38f6b49b29949f9fa2/sdk/src/cloudfall/operator.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/491/{{ revealButtonHref }}
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-6faa937f971ec0e078b7052accac7450a634497425b6a987966275a596c9bfd7
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-6faa937f971ec0e078b7052accac7450a634497425b6a987966275a596c9bfd7
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-6faa937f971ec0e078b7052accac7450a634497425b6a987966275a596c9bfd7
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-6faa937f971ec0e078b7052accac7450a634497425b6a987966275a596c9bfd7
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-6faa937f971ec0e078b7052accac7450a634497425b6a987966275a596c9bfd7
sdk/tests/test_s018_agent_approve.pyhttps://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-36fd0064676efbbeb0d12b024cd6f75386ed51987a9c9f10e2d16db8556151d4
View file https://github.com/cloudfall-dev/cloudfall/blob/00132639b138fc00f0401f38f6b49b29949f9fa2/sdk/tests/test_s018_agent_approve.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudfall-dev/cloudfall/pull/491/{{ revealButtonHref }}
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-36fd0064676efbbeb0d12b024cd6f75386ed51987a9c9f10e2d16db8556151d4
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-36fd0064676efbbeb0d12b024cd6f75386ed51987a9c9f10e2d16db8556151d4
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-36fd0064676efbbeb0d12b024cd6f75386ed51987a9c9f10e2d16db8556151d4
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-36fd0064676efbbeb0d12b024cd6f75386ed51987a9c9f10e2d16db8556151d4
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-36fd0064676efbbeb0d12b024cd6f75386ed51987a9c9f10e2d16db8556151d4
https://github.com/cloudfall-dev/cloudfall/pull/491/files#diff-36fd0064676efbbeb0d12b024cd6f75386ed51987a9c9f10e2d16db8556151d4
Please reload this pagehttps://github.com/cloudfall-dev/cloudfall/pull/491/files
Please reload this pagehttps://github.com/cloudfall-dev/cloudfall/pull/491/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.