René's URL Explorer Experiment


Title: aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect · Issue #2980 · developing-today/code · GitHub

Open Graph Title: aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect · Issue #2980 · developing-today/code

X Title: aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect · Issue #2980 · developing-today/code

Description: Finding PR #2099 taught the aggregator's two audit stores to quarantine a corrupt file instead of silently overwriting it (#1452), but the read-error path still silently treats any failure as "no store yet" — and the next persist then ov...

Open Graph Description: Finding PR #2099 taught the aggregator's two audit stores to quarantine a corrupt file instead of silently overwriting it (#1452), but the read-error path still silently treats any failure as "no s...

X Description: Finding PR #2099 taught the aggregator's two audit stores to quarantine a corrupt file instead of silently overwriting it (#1452), but the read-error path still silently treats any failure as &...

Opengraph URL: https://github.com/developing-today/code/issues/2980

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect","articleBody":"## Finding\n\nPR #2099 taught the aggregator's two audit stores to quarantine a corrupt file instead of silently overwriting it (#1452), but the **read-error path still silently treats any failure as \"no store yet\"** — and the next persist then overwrites the existing store. In both stores, `doLoad`'s first `catch` swallows every `readFile` error, not just ENOENT, despite the code comment directly above it stating that \"a missing file is the only silent empty start\".\n\nConcretely: if the store file exists and holds valid audit history but the read fails for a non-missing reason (EACCES after a permissions change, a transient I/O error, the path momentarily being something unreadable), the store starts empty with no log line at all, and the next `add()` persist — `mkdir` + write temp file + `rename` over the store path — replaces the unread history with a fresh file containing only the new record. That is exactly the silent audit-history loss #1452/#2099 set out to eliminate, reached through the read path instead of the parse path.\n\n## Evidence\n\n- Source PR: #2099 (merged, head `37ceccbe9f5b43a9fb0acdeaa803931e92b55eef`) — https://github.com/developing-today/code/pull/2099 — \"fix(aggregator): quarantine corrupt actions/comments stores (#1452)\"\n- Verified still present on current main `6a19fec557c172b57e5f704d7b7f9163a76e43bb`:\n  - `pm-stack/aggregator/src/actions.ts:434-447` — `doLoad`: comment at :435-441 says a missing file is the only silent empty start; the `catch` at :444-447 around `readFile` (:443) treats **all** errors that way and returns with `this.actions = []`, no logging, no quarantine attempt.\n  - `pm-stack/aggregator/src/comments.ts:114-127` — identical structure: comment :115-121, `readFile` :123, catch-all :124-127 setting `this.comments = []`.\n  - Persist overwrites unconditionally in both stores: `actions.ts` `persist()` (mkdir + `writeFile(tmp)` + `rename(tmp, this.file)`) and the mirrored `persist()` in `comments.ts` — so the first write after a failed read destroys the on-disk history the read never saw.\n- The parse/shape path in the same functions (actions.ts :448+, comments.ts :128+) does the right thing — quarantine to `\u003cfile>.corrupt-\u003ctimestamp>` plus a loud `console.error` — which makes the read path's silence an inconsistency in the same function, not a design choice.\n- Deduped 2026-10-31: `gh issue list --state all` searches for \"1452 quarantine\", \"corrupt store quarantine\", \"doLoad readFile\", \"store file unreadable overwrite\" return only #1452 itself (closed, the eval this PR implemented) — no issue covers the read-error path.\n\n## Why it matters\n\nThese two files are the dashboard's append-only audit history (actions and comments). #1452's whole point was that silently starting empty destroys that history. A permissions slip or transient read failure is at least as plausible as a truncated write, and today it produces the worst outcome in the matrix: no quarantine copy, no log line, and a routine persist that erases the original bytes.\n\n## Acceptance criteria\n\n- [ ] In both `ActionsStore.doLoad` and `CommentsStore.doLoad`, only ENOENT (file genuinely absent) takes the silent empty start; any other read error is loud: a `console.error` naming the file and the error, in the same style as the quarantine warning.\n- [ ] After a non-ENOENT read failure, a subsequent persist must not silently overwrite the unread store — e.g. attempt the same `.corrupt-\u003ctimestamp>` quarantine rename before starting empty, and if that fails, surface it explicitly (as the parse path already does) rather than proceeding silently.\n- [ ] Regression tests in `pm-stack/aggregator/test/store-corrupt.test.ts` (or a sibling) pin the non-ENOENT case for both stores (e.g. store path made unreadable / a directory-in-place probe where the platform allows, or an injected read error), alongside the existing missing/corrupt/wrong-shape/valid cases, which keep passing unchanged.\n- [ ] Behaviour for the genuinely-missing-file case is byte-for-byte what it is today (silent empty start, first write creates the file).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-31T07:27:15Z","url":"https://github.com/developing-today/code/issues/2980"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:48b6e055-116a-c1f1-e08b-9bae241b3ec8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE152:16C525:34E675:48DA16:6B074E10
html-safe-nonce7bc8b6dc0ffeb9845c37ff3cc2b2da2cd8bc55910c3a88c2b3dae7b476788d5f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTUyOjE2QzUyNTozNEU2NzU6NDhEQTE2OjZCMDc0RTEwIiwidmlzaXRvcl9pZCI6IjQxMDU0Mjc0NDQ2NzU1OTU3OTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1048b34433484010959bf1f8e4ce9a8d79def7720b8587780707ce7116a1f3f4
hovercard-subject-tagissue:6132398897
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/2980/issue_layout
twitter:imagehttps://opengraph.githubassets.com/077699e91bf16405b4524dcd0503996ce0563cd0624f4e918b2d8837ae16fccc/developing-today/code/issues/2980
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/077699e91bf16405b4524dcd0503996ce0563cd0624f4e918b2d8837ae16fccc/developing-today/code/issues/2980
og:image:altFinding PR #2099 taught the aggregator's two audit stores to quarantine a corrupt file instead of silently overwriting it (#1452), but the read-error path still silently treats any failure as "no s...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None26f151990bcb5b67b87df8b3f96ed340f849939d44e36f348402de5e39cca989
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecd00d8452bcb4e56a60ba7c0e61a697b46513fe9
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/2980#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F2980
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%2Fdeveloping-today%2Fcode%2Fissues%2F2980
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/2980
Reloadhttps://github.com/developing-today/code/issues/2980
Reloadhttps://github.com/developing-today/code/issues/2980
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests204 (204)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/2980
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/2980
#3522https://github.com/developing-today/code/pull/3522
aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protecthttps://github.com/developing-today/code/issues/2980#top
#3522https://github.com/developing-today/code/pull/3522
https://github.com/dezren39
app/aggregatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Faggregator%22
effort/shttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fs%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/pr-diff-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fpr-diff-review%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 31, 2026https://github.com/developing-today/code/issues/2980#issue-6132398897
#2099https://github.com/developing-today/code/pull/2099
#1452https://github.com/developing-today/code/issues/1452
#1452https://github.com/developing-today/code/issues/1452
#2099https://github.com/developing-today/code/pull/2099
fix(aggregator): quarantine corrupt actions/comments stores (#1452) #2099https://github.com/developing-today/code/pull/2099
fix(aggregator): quarantine corrupt actions/comments stores (#1452) #2099https://github.com/developing-today/code/pull/2099
eval(dashboard): actions/comments stores — JSON files vs SQLite #1452https://github.com/developing-today/code/issues/1452
eval(dashboard): actions/comments stores — JSON files vs SQLite #1452https://github.com/developing-today/code/issues/1452
#1452https://github.com/developing-today/code/issues/1452
Nexthttps://github.com/developing-today/code/issues/2980?timeline_page=1
dezren39https://github.com/dezren39
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
source/pr-diff-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fpr-diff-review%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
app/aggregatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Faggregator%22
effort/shttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fs%22
on Oct 31, 2026https://github.com/developing-today/code/issues/2980#event-34759794493
https://github.com/dezren39
dezren39https://github.com/dezren39
on Oct 31, 2026https://github.com/developing-today/code/issues/2980#issuecomment-6540614829
fix(aggregator): quarantine corrupt actions/comments stores (#1452) #2099https://github.com/developing-today/code/pull/2099
eval(dashboard): actions/comments stores — JSON files vs SQLite #1452https://github.com/developing-today/code/issues/1452
fix(aggregator): quarantine corrupt actions/comments stores (#1452) #2099https://github.com/developing-today/code/pull/2099
6a19fechttps://github.com/developing-today/code/commit/6a19fec557c172b57e5f704d7b7f9163a76e43bb
aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect #2980https://github.com/developing-today/code/issues/2980
aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect #2980https://github.com/developing-today/code/issues/2980
fix(aggregator): quarantine corrupt actions/comments stores (#1452) #2099https://github.com/developing-today/code/pull/2099
fix(aggregator): quarantine corrupt actions/comments stores (#1452) #2099https://github.com/developing-today/code/pull/2099
eval(dashboard): actions/comments stores — JSON files vs SQLite #1452https://github.com/developing-today/code/issues/1452
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Oct 31, 2026https://github.com/developing-today/code/issues/2980#event-34766535533
dezren39https://github.com/dezren39
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
on Nov 1, 2026https://github.com/developing-today/code/issues/2980#event-34827774603
dezren39https://github.com/dezren39
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
on Nov 1, 2026https://github.com/developing-today/code/issues/2980#event-34827826131
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 1, 2026https://github.com/developing-today/code/issues/2980#issuecomment-6557214205
aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect #2980https://github.com/developing-today/code/issues/2980
aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect #2980https://github.com/developing-today/code/issues/2980
aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect #2980https://github.com/developing-today/code/issues/2980
aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect #2980 (comment)https://github.com/developing-today/code/issues/2980#issuecomment-6557195233
dezren39https://github.com/dezren39
on Nov 1, 2026https://github.com/developing-today/code/issues/2980#event-34828177773
Merge pull request #3522 from developing-today/queue/5495-2980-enoent…https://github.com/developing-today/code/commit/1eb4d75290506c69556e795d8f74682623940d8a
#3522https://github.com/developing-today/code/pull/3522
1eb4d75https://github.com/developing-today/code/commit/1eb4d75290506c69556e795d8f74682623940d8a
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#3522https://github.com/developing-today/code/pull/3522
on Nov 1, 2026https://github.com/developing-today/code/issues/2980#event-34828178417
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 1, 2026https://github.com/developing-today/code/issues/2980#issuecomment-6557297418
fix(aggregator): stores distinguish ENOENT from other read errors (#2980) #3522https://github.com/developing-today/code/pull/3522
fix(aggregator): stores distinguish ENOENT from other read errors (#2980) #3522https://github.com/developing-today/code/pull/3522
fix(aggregator): stores distinguish ENOENT from other read errors (#2980) #3522https://github.com/developing-today/code/pull/3522
aggregator stores: non-ENOENT read errors silently start empty — next persist overwrites the audit history PR #2099 meant to protect #2980 (comment)https://github.com/developing-today/code/issues/2980#issuecomment-6557195233
dezren39https://github.com/dezren39
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
on Nov 1, 2026https://github.com/developing-today/code/issues/2980#event-34828204693
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/2980
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/2980
dezren39https://github.com/dezren39
app/aggregatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Faggregator%22
effort/shttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22effort%2Fs%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
priority/normalhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fnormal%22
source/pr-diff-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fpr-diff-review%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
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-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.