Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
OpenMOSS
ScienceEvolve
Repository navigation
Code
Issues
Pull requests
1
(1)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
ScienceEvolve
/
example
/
02-software-development
/
research_proposal.txt
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
11 lines (6 loc) · 1.26 KB
main
Breadcrumbs
ScienceEvolve
/
example
/
02-software-development
/
research_proposal.txt
Copy path
Top
File metadata and controls
Code
Blame
11 lines (6 loc) · 1.26 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
研究课题:原子文件写入能否提高命令行待办工具的持久化可靠性
研究问题:在进程中断或数据文件损坏时,“临时文件写入后替换”相较直接覆盖 JSON,能否减少已经确认写入的数据丢失与文件损坏?
研究假设:在单写入进程条件下,原子替换可以降低写入中断造成的损坏率,但会带来额外 I/O 成本。
研究对象与数据:实现仅依赖 Node.js 标准库的待办 CLI,以固定种子生成 add、list、done、remove 操作序列,并用内存模型作为结果参照。每种方案测试 100 条序列,每条 100 次操作,另设写入中断和损坏文件场景。
研究方案与评价:保持两种持久化策略的业务语义一致:add 返回稳定唯一 ID,list 按创建顺序显示,done 幂等,未知 ID、空白内容和无效参数报错;数据跨进程保存,损坏文件保持原状并报错。比较已确认操作的恢复一致率、文件可解析率和操作延迟。中断实验分别覆盖写入前、写入中与替换后,报告实际覆盖到的故障点。
预期认识:给出单进程下可靠性与性能的取舍,以及可重跑的源码、测试和使用说明;不把进程中断测试等同于断电或并发写入保证。
You can’t perform that action at this time.