Compare commits

...

6 Commits

Author SHA1 Message Date
vorotamoroz 0aed7f8556 Add remediation fix to unreleased notes 2026-07-31 10:35:05 +00:00
vorotamoroz 50a51bf07e Use setting control for remediation status 2026-07-31 10:08:34 +00:00
vorotamoroz 1570136703 Fix remediation status element insertion 2026-07-31 09:13:56 +00:00
vorotamoroz 5b6bbc8118 Remove release instruction text assertions 2026-07-31 09:13:21 +00:00
vorotamoroz 54f0262b3f Fix stable release promotion order 2026-07-31 08:55:26 +00:00
vorotamoroz 7d33613017 Merge pull request #1061 from vrtmrz/1_0_2
Releasing 1.0.2
2026-07-31 17:39:40 +09:00
7 changed files with 118 additions and 46 deletions
+3 -2
View File
@@ -137,8 +137,9 @@ jobs:
echo "Keep the release pull request in draft and unmerged after BRAT validation; close it only through a separate maintainer action."
elif [[ "${PRERELEASE}" == "true" ]]; then
echo "Publish the draft initially as a pre-release without replacing the latest stable release."
echo "After BRAT validation, merge the release pull request into its reviewed base branch and integrate the exact release commit into the default branch."
echo "Only after the default branch contains the exact release metadata, remove the pre-release designation and make this exact release the latest stable release."
echo "After BRAT validation, remove the pre-release designation and make this exact release the latest stable release before its manifest reaches the default branch."
echo "Confirm the release is no longer a pre-release, then merge the release pull request into its reviewed base branch and integrate the exact release commit into the default branch."
echo "This order prevents Community Directory review from inspecting a stable manifest version while the matching GitHub Release remains a pre-release."
echo "Create the stable CLI tag and publish its latest and major-minor image tags through a separate maintainer gate."
else
echo "Publish the draft as the latest stable release, keep the release pull request in draft, and merge only after BRAT validation succeeds."
+3 -3
View File
@@ -250,7 +250,7 @@ export class ModuleExample extends AbstractObsidianModule {
- A plug-in review release may omit the CLI image when the CLI artefact is not part of the required validation. When a pre-release CLI image is published, it receives immutable version and SHA-qualified tags only; it must not advance `latest` or a stable major-minor tag.
- Keep a hyphenated pre-release's release pull request in draft and unmerged after BRAT validation. Reconcile the published version's metadata into its base branch through a reviewed metadata-only commit, then close the release pull request only through a separate maintainer action.
- Stage a stable version for BRAT by publishing its exact `x.y.z` tag initially as a GitHub pre-release with `prerelease=true` and `publish_cli=false`. The stable manifest version would otherwise make the CLI workflow advance `latest` and the major-minor image tag before validation.
- After a staged stable version passes BRAT validation, merge its exact release commit into the reviewed base branch and integrate it through the reviewed branch chain into the repository's default branch. Promote the GitHub Release only after the default branch contains the exact stable metadata; publish stable CLI tags through a separate maintainer gate.
- After a staged stable version passes BRAT validation, remove the GitHub pre-release designation and make the exact release the latest stable release first. Confirm that promotion, then merge its exact release commit into the reviewed base branch and integrate it through the reviewed branch chain into the repository's default branch. This order prevents Community Directory review from inspecting a stable manifest version while the matching GitHub Release remains a pre-release. Publish stable CLI tags through a separate maintainer gate.
- If validation fails, leave every published tag unchanged and prepare the next pre-release or patch version.
## Release Notes
@@ -276,7 +276,7 @@ The `Finalise Release Tags` and `Release Obsidian Plugin` workflows use the `rel
- Publish the draft as a GitHub pre-release without replacing the latest stable release. Keep its release pull request in draft and leave its base branch unchanged throughout BRAT validation. Record that state in the pull request.
- Validate the published release through BRAT. Confirm start-up, ordinary bidirectional synchronisation, and any regression scenario relevant to the release.
- After a hyphenated pre-release passes, keep its release pull request unmerged. Add a reviewed metadata-only commit to the selected base branch which records the published version in `versions.json` and moves its exact tagged release notes out of `## Unreleased`, then close the release pull request only through a separate maintainer action.
- After a stable version passes, mark its release pull request ready and merge the exact release commit into the selected base branch with a merge commit. Integrate that exact commit through the reviewed branch chain into the repository's default branch. Only after the default branch contains the matching stable metadata, remove the GitHub pre-release designation and make that exact release the latest stable release. Create the stable CLI tag and publish its `latest` and major-minor image tags, if selected, through a separate maintainer gate.
- After a stable version passes, remove the GitHub pre-release designation and make that exact release the latest stable release. Confirm that the release is no longer a pre-release, then mark its release pull request ready, merge the exact release commit into the selected base branch with a merge commit, and integrate that exact commit through the reviewed branch chain into the repository's default branch. Confirm that the default branch contains the matching stable metadata. Create the stable CLI tag and publish its `latest` and major-minor image tags, if selected, through a separate maintainer gate.
- If BRAT validation fails, keep the release PR in draft and do not move published tags. Before preparing the next version, add a reviewed metadata-only commit to the selected base branch which records the published version in `versions.json` and moves its exact tagged release notes out of `## Unreleased`. Keep only changes made after that tag under `## Unreleased`. Compare the historical section with `git show <tag>:updates.md`; do not merge the failed release PR or describe it as validated. The next release PR can then rotate only the correction notes while preserving the immutable release history.
- Prepare and publish the next patch or pre-release version from that reconciled base. Leave the failed release PR draft until it is deliberately closed as superseded under a separate maintainer action.
- A hyphenated version is rejected unless `prerelease=true`. A stable version staged with `prerelease=true` is rejected unless `publish_cli=false`.
@@ -307,7 +307,7 @@ The `Finalise Release Tags` and `Release Obsidian Plugin` workflows use the `rel
8. Update the PR state message to describe the published pre-release and state that merging remains on hold.
9. Validate the published release through BRAT, including start-up, ordinary bidirectional synchronisation, and any release-specific regression scenario.
10. After a hyphenated pre-release passes, keep its release PR unmerged, reconcile its `versions.json` entry and exact release-note section into the selected base branch as metadata only, then close the PR through a separate maintainer action.
11. After a stable version passes, mark the release PR ready and merge the exact release commit into the selected base branch. Integrate that commit through the reviewed branch chain into the repository's default branch. Once the default branch contains the matching stable metadata, remove the pre-release designation, make the exact release the latest stable release, and publish stable CLI tags through a separate maintainer gate if selected.
11. After a stable version passes, remove the pre-release designation and make the exact release the latest stable release. Confirm that promotion, then mark the release PR ready, merge the exact release commit into the selected base branch, and integrate it through the reviewed branch chain into the repository's default branch. Confirm that the default branch contains the matching stable metadata, then publish stable CLI tags through a separate maintainer gate if selected.
12. If validation fails, leave the PR in draft and do not move the published tags. Reconcile the published version's `updates.md` section and `versions.json` entry into the base branch as metadata only, then prepare the next patch or pre-release version from the remaining `## Unreleased` entries.
## Contribution Guidelines
@@ -176,8 +176,9 @@ export function panePatches(this: ObsidianLiveSyncSettingTab, paneEl: HTMLElemen
new Setting(paneEl).autoWireToggle("disableCheckingConfigMismatch");
});
void addPanel(paneEl, "Remediation").then((paneEl) => {
let dateEl: HTMLSpanElement;
new Setting(paneEl)
const setting = new Setting(paneEl);
const dateEl = setting.controlEl.createSpan();
setting
.addText((text) => {
const updateDateText = () => {
if (this.editingSettings.maxMTimeForReflectEvents == 0) {
@@ -188,7 +189,6 @@ export function panePatches(this: ObsidianLiveSyncSettingTab, paneEl: HTMLElemen
}
this.requestUpdate();
};
text.inputEl.before((dateEl = activeDocument.createSpan()));
text.inputEl.type = "datetime-local";
if (this.editingSettings.maxMTimeForReflectEvents > 0) {
const date = new Date(this.editingSettings.maxMTimeForReflectEvents);
@@ -0,0 +1,97 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { panePatches } from "./PanePatches.ts";
const remediationHarness = vi.hoisted(() => {
const dateElement = { textContent: "" };
const createSpan = vi.fn(() => dateElement);
const inputEl = {
type: "",
};
const textComponent = {
inputEl,
onChange: vi.fn(),
setValue: vi.fn(),
};
return {
createSpan,
dateElement,
inputEl,
textComponent,
};
});
vi.mock("./LiveSyncSetting.ts", () => ({
LiveSyncSetting: class LiveSyncSetting {
controlEl = {
createSpan: remediationHarness.createSpan,
};
addText(callback: (text: typeof remediationHarness.textComponent) => void): this {
callback(remediationHarness.textComponent);
return this;
}
setAuto(): this {
return this;
}
addApplyButton(): this {
return this;
}
autoWireToggle(): this {
return this;
}
},
}));
afterEach(() => {
Reflect.deleteProperty(globalThis, "activeDocument");
vi.clearAllMocks();
remediationHarness.dateElement.textContent = "";
remediationHarness.inputEl.type = "";
});
describe("panePatches remediation setting", () => {
it("creates the status element in the setting control instead of the document", () => {
const hierarchyError = new DOMException(
"Failed to execute 'appendChild' on 'Node': Only one element on document allowed.",
"HierarchyRequestError"
);
const createSpan = vi.fn(() => {
throw hierarchyError;
});
Object.defineProperty(globalThis, "activeDocument", {
configurable: true,
value: { createSpan },
});
const host = {
addOnSaved: vi.fn(),
editingSettings: {
maxMTimeForReflectEvents: 0,
},
requestUpdate: vi.fn(),
};
const addPanel = vi.fn((_paneEl: HTMLElement, title: string) => ({
then(callback: (paneEl: HTMLElement) => void) {
if (title === "Remediation") {
callback({} as HTMLElement);
}
return Promise.resolve();
},
}));
panePatches.call(
host as never,
{} as HTMLElement,
{
addPanel,
} as never
);
expect(createSpan).not.toHaveBeenCalled();
expect(remediationHarness.createSpan).toHaveBeenCalledOnce();
expect(remediationHarness.dateElement.textContent).toBe("No limit configured");
});
});
+6
View File
@@ -12,6 +12,12 @@ Earlier releases remain available in the 0.25 release history and the legacy rel
## Unreleased
### Interface
#### Fixed
- The Remediation setting now displays its configured modification-time limit without raising a `HierarchyRequestError`.
## 1.0.2
31st July, 2026
+5 -6
View File
@@ -52,15 +52,14 @@ export function renderReleasePrBody(version, baseBranch) {
: "Confirm the draft GitHub Release assets; keep stable CLI publication deferred until BRAT validation passes";
const holdInstruction = isPrerelease
? `Publishing and validating this pre-release does not unblock this pull request. Keep it in draft and unmerged, and leave ${baseBranchCode} unchanged.`
: `Publishing the GitHub pre-release does not unblock this pull request. Keep it in draft, and leave ${baseBranchCode} unchanged, until the exact published build has passed BRAT validation. Promotion remains on hold until the exact release commit has been integrated into the repository's default branch.`;
: `Publishing the GitHub pre-release does not unblock this pull request. Keep it in draft, and leave ${baseBranchCode} unchanged, until the exact published build has passed BRAT validation. Before the exact release commit reaches the repository's default branch, remove the pre-release designation and make this exact release the latest stable release so Community Directory review does not inspect a manifest version whose GitHub Release remains a pre-release.`;
const completionInstructions = isPrerelease
? [
"- [ ] Keep this pre-release pull request unmerged; close it only through a separate maintainer action",
]
? ["- [ ] Keep this pre-release pull request unmerged; close it only through a separate maintainer action"]
: [
`- [ ] After BRAT validation passes, mark this pull request ready and merge it into ${baseBranchCode} with a merge commit`,
"- [ ] After BRAT validation passes, remove the pre-release designation and make this exact release the latest stable release",
`- [ ] Confirm this exact release is no longer a pre-release, then mark this pull request ready and merge it into ${baseBranchCode} with a merge commit`,
"- [ ] Integrate the exact release commit through the reviewed branch chain into the repository's default branch",
"- [ ] Confirm the default branch contains the exact release metadata, then remove the pre-release designation and make this exact release the latest stable release",
"- [ ] Confirm the default branch contains the exact release commit and metadata",
"- [ ] Create the stable CLI tag and publish its `latest` and major-minor image tags, if selected, through a separate maintainer gate",
];
+1 -32
View File
@@ -206,43 +206,12 @@ describe("release workflow", () => {
expect(stable).toContain(
"Publish the GitHub Release initially as a pre-release without replacing the latest stable release"
);
expect(stable).toContain(
"After BRAT validation passes, mark this pull request ready and merge it into `main` with a merge commit"
);
expect(stable).toContain(
"Integrate the exact release commit through the reviewed branch chain into the repository's default branch"
);
expect(stable).toContain(
"Confirm the default branch contains the exact release metadata, then remove the pre-release designation and make this exact release the latest stable release"
);
expect(stable).toContain(
"Create the stable CLI tag and publish its `latest` and major-minor image tags, if selected, through a separate maintainer gate"
);
expect(stable.indexOf("After BRAT validation passes")).toBeLessThan(
stable.indexOf("Integrate the exact release commit")
);
expect(stable.indexOf("Integrate the exact release commit")).toBeLessThan(
stable.indexOf("Confirm the default branch contains the exact release metadata")
);
expect(stable.indexOf("Confirm the default branch contains the exact release metadata")).toBeLessThan(
stable.indexOf("Create the stable CLI tag")
);
expect(stable).not.toContain("prerelease=false");
});
it("summarises immutable pre-releases separately from stable versions awaiting promotion", () => {
it("requires stable pre-release staging to defer CLI publication", () => {
const workflow = readFileSync(finaliseReleaseWorkflow, "utf8");
expect(workflow).toContain('if [[ "${VERSION}" == *-* ]]; then');
expect(workflow).toContain(
"Keep the release pull request in draft and unmerged after BRAT validation; close it only through a separate maintainer action."
);
expect(workflow).toContain(
"After BRAT validation, merge the release pull request into its reviewed base branch and integrate the exact release commit into the default branch."
);
expect(workflow).toContain(
"Only after the default branch contains the exact release metadata, remove the pre-release designation and make this exact release the latest stable release."
);
expect(workflow).toContain(
'if [[ "${VERSION}" != *-* && "${PRERELEASE}" == "true" && "${PUBLISH_CLI}" == "true" ]]; then'
);