feat(docx-markdoc)!: remove the deprecated operation=/operations= spellings - #1130
Conversation
…llings A .mdoc file that still names an edit with operation= (or lists change-set members with operations=) now fails validation with REMOVED_EDIT_ATTRIBUTE, whose message names the replacement attribute. DEPRECATED_EDIT_ATTRIBUTE and CONFLICTING_EDIT_ATTRIBUTES are no longer produced. Closes #1106
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
LLM gate (advisory)All evaluated rules passed - 5 pass, 0 warn, 0 error, 11 skipped, 16 total FindingsNone. All 16 rules (5 evaluated, 11 skipped)
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ocConfig Declare operation=/operations= with a custom attribute type that returns REMOVED_EDIT_ATTRIBUTE, so raw Markdoc.validate with the public markdocConfig rejects them too instead of silently accepting them. parseMarkdoc now gets the error from the schema and no longer emits it separately. Also make the warnings comments producer-neutral.
Codex peer review (gpt-5.6-sol): REQUEST CHANGES, both findings addressed in d06feedThe reviewer ran the targeted tests, the full docx-markdoc suite, lint/build, spec coverage, strict openspec validation, CLI probes and crafted parser probes. It confirmed:
Adjudication
Re-ran after the fix: |
|
Post-merge smoke: PASS. Ran on merge commit d972566, whose docx-markdoc tree is identical to the tested worktree, against the real Bonterms mutual NDA (
|
Summary
The
operation=/operations=spellings that #1105 deprecated (shipped in 0.21.2 with aDEPRECATED_EDIT_ATTRIBUTEwarning) are now removed. While both were accepted, every agent or reviewer reading a.mdocfile had to know two names for one thing, and agents trained on older examples kept writing the old one because a warning is easy to miss in a compile log.editName()inpackages/docx-markdoc/src/markdoc.ts: anyoperation=(onchange,replace-source,delete-source,insert-before,insert-after,insert-table-rows,delete-table-row,annotation) oroperations=(onchange-set) now produces a validation errorREMOVED_EDIT_ATTRIBUTEwith a migration message,operation= was renamed to edit=; rename the attribute.(operations=toedits=likewise). The error comes from the Markdoc schema itself (a custom attribute type on the retainedoperation/operationsdeclarations), so rawMarkdoc.validateagainst the exportedmarkdocConfigreports it too, not onlyparseMarkdoc/CLI/compile It is reported whether or notedit=/edits=is also set, soCONFLICTING_EDIT_ATTRIBUTESis no longer reachable and is gone.invalid-attributerejection. The old value still feeds cross-reference resolution, so a not-yet-migrated file gets one error per tag, not a pile of orphan-rationale / missing-name errors on top.DEPRECATED_EDIT_ATTRIBUTEis deleted. The general non-fatalwarningschannel (ValidationResult.warnings,certificate.markdocWarnings, CLI stderr) stays as-is. It currently has no producer, but removing it would be a separate API change.requireMarkdoc/compileMarkdocrejection, rawMarkdoc.validatewith the exportedmarkdocConfig, and that renaming the attribute makes the same file validate without warnings). SDX-MDOC-149 covers the old spelling beside the new one. SDX-MDOC-147 (unchanged) coversedit=/edits=files, and SDX-MDOC-150 (unchanged) covers byte-identical import. The CLI test SDX-MDOC-152 uses the new code.rename-markdoc-operation-to-edit: requirement text, scenarios 148/149, proposal (BREAKING note) and tasks updated.openspec validate --strictpasses.## Unreleasedentry marked Breaking with the migration: rename the attribute.Migration for existing
.mdocfiles: renameoperation=toedit=andoperations=toedits=.Checks
npm run build,npm run lint:workspaces,npm run test:run,npm run check:spec-coverageall pass locally. (There is notest:coveragescript for@usejunior/docx-markdocon main yet, so no coverage ratchet applies.)Closes #1106