René's URL Explorer Experiment


Title: fix(native-chat): reset history when a saved record key is damaged by AmoabaKelvin · Pull Request #37549 · stablyai/orca · GitHub

Open Graph Title: fix(native-chat): reset history when a saved record key is damaged by AmoabaKelvin · Pull Request #37549 · stablyai/orca

X Title: fix(native-chat): reset history when a saved record key is damaged by AmoabaKelvin · Pull Request #37549 · stablyai/orca

Description: Files Added Deleted Net Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96 Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​14 ELI5 When a saved chat record has a damaged key, a phone reconnecting to that chat now gets a fresh copy of the chat. Before, it got an error and kept retrying the same read. What Changed Before: a client catching up from a cursor got a runtime_error (for a numeric key, invalid journal public outcome key) from agentSession.subscribe or agentSession.history (direction: 'after'). The client reconnected from the same cursor and hit the same record again. Live publishes threw on the same read, so that subscriber went stale. After: the client gets a schema_unreadable reset with a page built from the chat's reduced state, and its cursor moves to the live one, past the damaged record. readJournalOutcomeGroups parsed each key with a bare JSON.parse and plain throws, so damage looked like any other error. It now reports damage as JournalOutcomeDecodeError through decodingOutcome, the same class open uses. readJournalSince, which already returns { ok: false, reset }, maps that class to a reset. reusePromptProjection reads through it too and falls back to a full projection. The ticket says the chat still opens when a superseded record has a damaged key. That holds only in two cases, and the tests cover both: a numeric key whose newest record is a deletion, which admission accepts on reopen; any damaged key that appears while the chat is already open. A garbled key ({damaged) forms its own key group, so open reads it as that group's newest record and still refuses the chat as journalCorrupt after a restart. I left that as it is. Why Mapping in readJournalSince covers every readSince caller. Mapping in readForward would have left the prompt projection throwing during publishes. readJournalRowsAfterCursor has no way to return a reset. The catch is limited to JournalOutcomeDecodeError, and decodingOutcome wraps only the key parse, so a SQLite error stays a retryable error instead of discarding the client's place. journal_read_only still throws, because a reset page built from memory would hide a newer writer. schema_unreadable was already in AGENT_JOURNAL_RESET_REASONS. journal_gap means missing sequences, which isn't what happened here. Linked Issue Fixes STA-13100 Visual Proof N/A. No UI changes. The client handles this reset with its existing reset path. Testing Three regression tests in structured-agent-session-at-rest.test.ts go through the real RPC dispatcher and host, against a real SQLite database on disk: a numeric superseded key after a restart: open works, history and subscribe from a stale cursor reset, and subscribe from the live cursor gets a plain batch; unparseable and non-text keys damaged under an open chat: history resets; a real storage failure (table renamed away): history errors, then succeeds once the table is back. The two damage tests fail on main with a runtime_error reply instead of a reset. The storage test fails if the catch is widened to every error. Ran on macOS, with focused tests and changed-file checks only. I didn't run this in a live app or on a phone. I manually tested these changes locally Automated tests added/updated, or explained why not below Risk The risky part is a stored record that is actually fine but rejected by the key check. That client would get one reset and a fresh page, then carry on from the live cursor. No stored data changes, and intact histories read as before. Older clients are safe: they branch on the frame type, not the reset reason, and the reason was already part of the shared type. Back out with a plain revert. Level: Low AI Disclosure Review Agent skill upstream boundary Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation. Notes Security: no new input trust. Cross-platform: SQLite reads only, no platform branches. Remote SSH and mobile: both use the same host read, and the reset frame already exists on the wire. Performance: one closure per key on a read that already parses JSON per key. Checklist This PR is small and focused I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives) I stated the risk: what could break, for whom, and how to back it out Before/after screenshots or videos attached for UI changes, or N/A with reason Self-reviewed for correctness, security, and performance Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A) pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Open Graph Description: Files Added Deleted Net Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96 Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23 $\color{#cf222e}{\Huge{\mat...

X Description: Files Added Deleted Net Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96 Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23 $\color{#cf222e}{\Huge{\mat...

Opengraph URL: https://github.com/stablyai/orca/pull/37549

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:359228cd-f83b-0782-b405-600ec7c9926c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCD46:2B933C:D2DCA:111ADE:6AEBE044
html-safe-noncec1f20350af27d2efb12805c5340628f59b1580b843a953d0a46da992aafe9128
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDQ2OjJCOTMzQzpEMkRDQToxMTFBREU6NkFFQkUwNDQiLCJ2aXNpdG9yX2lkIjoiMjQwMDIyODE4NTgwNzI0OTQ3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacadac6b5623246a679a27736c9f23aadbed96abbfbeac5671bbeed7b894155b11
hovercard-subject-tagpull_request:5127384048
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/stablyai/orca/pull/37549/files
twitter:imagehttps://avatars.githubusercontent.com/u/97001695?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/97001695?s=400&v=4
og:image:altFiles Added Deleted Net Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​96 Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​23 $\color{#cf222e}{\Huge{\mat...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None701f7e3aecc56e7594e73fa7b7e1483af74322a67f7038be453d0feb05e86e77
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/stablyai/orca git https://github.com/stablyai/orca.git
octolytics-dimension-user_id127256420
octolytics-dimension-user_loginstablyai
octolytics-dimension-repository_id1183888342
octolytics-dimension-repository_nwostablyai/orca
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1183888342
octolytics-dimension-repository_network_root_nwostablyai/orca
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
release12d1048a3491dd63e4193b2937cf72f1c24a2a52
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/stablyai/orca/pull/37549/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstablyai%2Forca%2Fpull%2F37549%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%2Fstablyai%2Forca%2Fpull%2F37549%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=stablyai%2Forca
Reloadhttps://github.com/stablyai/orca/pull/37549/files
Reloadhttps://github.com/stablyai/orca/pull/37549/files
Reloadhttps://github.com/stablyai/orca/pull/37549/files
stablyaihttps://github.com/stablyai
orcahttps://github.com/stablyai/orca
Codehttps://github.com/stablyai/orca
Issues4.4k (4.4k)https://github.com/stablyai/orca/issues
Pull requests3.8k (3.8k)https://github.com/stablyai/orca/pulls
Discussionshttps://github.com/stablyai/orca/discussions
Actionshttps://github.com/stablyai/orca/actions
Projectshttps://github.com/stablyai/orca/projects
Security and qualityhttps://github.com/stablyai/orca/security
Insightshttps://github.com/stablyai/orca/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fstablyai%2Forca%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fstablyai%2Forca%2Fissues%2Fnew%2Fchoose
AmoabaKelvinhttps://github.com/AmoabaKelvin
mainhttps://github.com/stablyai/orca/tree/main
fix/damaged-key-history-resethttps://github.com/stablyai/orca/tree/fix/damaged-key-history-reset
Conversation 1 https://github.com/stablyai/orca/pull/37549
Commits 1 https://github.com/stablyai/orca/pull/37549/commits
Checks 48 https://github.com/stablyai/orca/pull/37549/checks
Files changed 3 https://github.com/stablyai/orca/pull/37549/files
fix(native-chat): reset history when a saved record key is damaged https://github.com/stablyai/orca/pull/37549/files#top
Show all changes 1 commit https://github.com/stablyai/orca/pull/37549/files
edc57e1 fix(native-chat): reset history when a saved record key is damaged AmoabaKelvin Nov 2, 2026 https://github.com/stablyai/orca/pull/37549/commits/edc57e197f7cf9802cab6ee8774e93dcf1bff190
Clear filters https://github.com/stablyai/orca/pull/37549/files
Please reload this pagehttps://github.com/stablyai/orca/pull/37549/files
Please reload this pagehttps://github.com/stablyai/orca/pull/37549/files
journal-cursor.ts https://github.com/stablyai/orca/pull/37549/files#diff-422f07cf62a3af45b47bf256f89aa68ab669aa95a044afb88c616b359deef719
journal-read-row.ts https://github.com/stablyai/orca/pull/37549/files#diff-a2156ee862e882935a470f0091ef69adaebd544380b6b948b65fb2c5cd9e9873
structured-agent-session-at-rest.test.ts https://github.com/stablyai/orca/pull/37549/files#diff-6063994ddbffd9d51ae125b05e8fa9ceae4b92099499cad567461fe9a5a41b03
src/main/native-chat/agent-session-journal/journal-cursor.tshttps://github.com/stablyai/orca/pull/37549/files#diff-422f07cf62a3af45b47bf256f89aa68ab669aa95a044afb88c616b359deef719
View file https://github.com/stablyai/orca/blob/edc57e197f7cf9802cab6ee8774e93dcf1bff190/src/main/native-chat/agent-session-journal/journal-cursor.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/stablyai/orca/pull/37549/{{ revealButtonHref }}
https://github.com/stablyai/orca/pull/37549/files#diff-422f07cf62a3af45b47bf256f89aa68ab669aa95a044afb88c616b359deef719
https://github.com/stablyai/orca/pull/37549/files#diff-422f07cf62a3af45b47bf256f89aa68ab669aa95a044afb88c616b359deef719
https://github.com/stablyai/orca/pull/37549/files#diff-422f07cf62a3af45b47bf256f89aa68ab669aa95a044afb88c616b359deef719
src/main/native-chat/agent-session-journal/journal-read-row.tshttps://github.com/stablyai/orca/pull/37549/files#diff-a2156ee862e882935a470f0091ef69adaebd544380b6b948b65fb2c5cd9e9873
View file https://github.com/stablyai/orca/blob/edc57e197f7cf9802cab6ee8774e93dcf1bff190/src/main/native-chat/agent-session-journal/journal-read-row.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/stablyai/orca/pull/37549/{{ revealButtonHref }}
https://github.com/stablyai/orca/pull/37549/files#diff-a2156ee862e882935a470f0091ef69adaebd544380b6b948b65fb2c5cd9e9873
https://github.com/stablyai/orca/pull/37549/files#diff-a2156ee862e882935a470f0091ef69adaebd544380b6b948b65fb2c5cd9e9873
https://github.com/stablyai/orca/pull/37549/files#diff-a2156ee862e882935a470f0091ef69adaebd544380b6b948b65fb2c5cd9e9873
src/main/runtime/rpc/methods/structured-agent-session-at-rest.test.tshttps://github.com/stablyai/orca/pull/37549/files#diff-6063994ddbffd9d51ae125b05e8fa9ceae4b92099499cad567461fe9a5a41b03
View file https://github.com/stablyai/orca/blob/edc57e197f7cf9802cab6ee8774e93dcf1bff190/src/main/runtime/rpc/methods/structured-agent-session-at-rest.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/stablyai/orca/pull/37549/{{ revealButtonHref }}
https://github.com/stablyai/orca/pull/37549/files#diff-6063994ddbffd9d51ae125b05e8fa9ceae4b92099499cad567461fe9a5a41b03
Please reload this pagehttps://github.com/stablyai/orca/pull/37549/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

Viewport: width=device-width


URLs of crawlers that visited me.