create can leave a page that nothing on disk names
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start in cmd/create/create.go at reserveOne, then trace CreatePage, os.WriteFile, persistToManifest, and failKeepingPage. Compare the recovery and failure paths and confirm the chosen behavior with maintainers; done means a failed reservation cannot leave an unrecorded page, or provides an exact actionable recovery record.
Written by the indexing model from the issue text.
Description
create can leave a page in Confluence that nothing on disk names.
In the reserve phase, reserveOne (cmd/create/create.go) calls CreatePage and only then records the new page_id. It records it in one of two places: the file's frontmatter (os.WriteFile) or a pages: entry in markfluence.yaml (persistToManifest). If that write fails, the page already exists. Examples are a read-only .md file, a read-only markfluence.yaml, or a manifest write that gives up after its one retry.
failKeepingPage keeps the id and URL in the command's result, so the run's own output is the only record. A second create makes a second page, because nothing says the first one exists. update cannot pick it up either, because nothing names the page.
This is the one case in create's partial-failure story that update cannot recover from. The other two recover:
- A network failure during publish leaves a stub whose id is already on disk, so
updatefinishes it. - An unreadable attachment fails the same way, after the id is on disk.
Options:
- Check that the destination is writable before
CreatePage. This is cheap, but it races: the check can pass and the write can still fail. - Write first, create second. Reserve a placeholder on disk, create the page, then fill in the id. A failure then leaves a local marker instead of a remote orphan.
- Make the failure loud and actionable. For example, print the exact frontmatter line or manifest entry to add by hand, and give it an exit code a script can recognize.
- Dominant language
- Go
- Stars
- 2
- Forks
- 0
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 52
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mozilla/markfluence
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
mozilla/markfluence#186 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
mozilla/markfluence#184 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
mozilla/markfluence#181 · 1 comment ·
-
bug
Difficulty 5/5 Over a week Newbie friendliness 48/100
mozilla/markfluence#163 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
mozilla/markfluence#162 ·
All issues in mozilla/markfluence
Similar issues
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1393 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
JakeChampion/lang#10213 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
oasisprotocol/oasis-sdk#2523 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100