Add editor section node; serialize pnpm CI jobs to fix runner flake
All checks were successful
CI / Auth e2e pack (push) Successful in 4m10s
CI / Import/export fidelity gate (push) Successful in 45s
CD / Build and push images (push) Successful in 1m0s
CD / Deploy to Test (push) Successful in 9s
CD / Smoke tests against Test (push) Successful in 1m8s
CD / Promote to Int (push) Successful in 10s
CI / Lint, typecheck, test (push) Successful in 2m48s
CI / Build container images (push) Has been skipped
All checks were successful
CI / Auth e2e pack (push) Successful in 4m10s
CI / Import/export fidelity gate (push) Successful in 45s
CD / Build and push images (push) Successful in 1m0s
CD / Deploy to Test (push) Successful in 9s
CD / Smoke tests against Test (push) Successful in 1m8s
CD / Promote to Int (push) Successful in 10s
CI / Lint, typecheck, test (push) Successful in 2m48s
CI / Build container images (push) Has been skipped
Two corrective changes:
- Register the `section` node in the web TipTap editor (with
wrapInSection/unwrapSection commands) so the editor schema matches the
shared editorSchema again. The schema-drift guard
(document-extensions.test) rightly failed after 2e96173 added `section`
to the shared schema without the editor side — this restores it.
- Replace the ineffective warm-up gate with a serial chain of the pnpm
CI jobs (checks -> auth-e2e -> fidelity). Warming the shared action
cache did not help: the dependent jobs still started together and
corrupted the cache during concurrent extraction. Serializing them is
what actually prevents it; CD image builds still run in parallel.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwZ4jR4KFAPvpjWevfUGX1
This commit is contained in:
parent
2e96173d44
commit
784f21d805
@ -13,29 +13,16 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Warm the runner's shared action cache once, alone, before the parallel
|
# The pnpm jobs are chained (checks -> auth-e2e -> fidelity) so no two run
|
||||||
# pnpm jobs start. With the runner at capacity > 1, several jobs otherwise
|
# at once. At runner capacity > 1 they otherwise start together and extract
|
||||||
# fetch the same actions (checkout, setup-node, pnpm/action-setup) into the
|
# the same actions (setup-node, pnpm/action-setup) into the shared offline
|
||||||
# shared offline cache simultaneously and read it half-written — a flaky
|
# cache (`/run/act/actions`) concurrently, reading it half-written — a flaky
|
||||||
# "Cannot find module .../dist/…" in "Set up Node.js"/"Set up pnpm". Running
|
# "Cannot find module .../dist/…" in "Set up Node.js"/"Set up pnpm". Warming
|
||||||
# these actions once here populates the cache completely; the dependent jobs
|
# the cache first did not help (concurrent extraction still corrupts it);
|
||||||
# then only read it. Cheap (~30 s) and keeps full parallelism afterwards.
|
# only serialization does. The CD image builds still run in parallel, so the
|
||||||
prepare:
|
# runner's spare capacity is not wasted.
|
||||||
name: Warm action cache
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Set up pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
|
|
||||||
checks:
|
checks:
|
||||||
name: Lint, typecheck, test
|
name: Lint, typecheck, test
|
||||||
needs: prepare
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
@ -86,7 +73,7 @@ jobs:
|
|||||||
# already-built-and-seeded stack, instead of spinning up a second one.
|
# already-built-and-seeded stack, instead of spinning up a second one.
|
||||||
auth-e2e:
|
auth-e2e:
|
||||||
name: Auth e2e pack
|
name: Auth e2e pack
|
||||||
needs: prepare
|
needs: checks
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
@ -377,7 +364,7 @@ jobs:
|
|||||||
# job (no sidecars there).
|
# job (no sidecars there).
|
||||||
fidelity:
|
fidelity:
|
||||||
name: Import/export fidelity gate
|
name: Import/export fidelity gate
|
||||||
needs: prepare
|
needs: auth-e2e
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# A guard so a hung sidecar can never keep the job (and its containers)
|
# A guard so a hung sidecar can never keep the job (and its containers)
|
||||||
# alive on the shared runner host; the suite itself finishes in ~1 min.
|
# alive on the shared runner host; the suite itself finishes in ~1 min.
|
||||||
@ -458,7 +445,7 @@ jobs:
|
|||||||
|
|
||||||
images:
|
images:
|
||||||
name: Build container images
|
name: Build container images
|
||||||
needs: prepare
|
needs: checks
|
||||||
# PR-only: on main the CD workflow builds and pushes the same images —
|
# PR-only: on main the CD workflow builds and pushes the same images —
|
||||||
# building twice would waste the runner (ADR 0014: build once, promote).
|
# building twice would waste the runner (ADR 0014: build once, promote).
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import {
|
|||||||
Heading,
|
Heading,
|
||||||
HorizontalRule,
|
HorizontalRule,
|
||||||
Paragraph,
|
Paragraph,
|
||||||
|
Section,
|
||||||
Text,
|
Text,
|
||||||
} from './nodes/text-basics';
|
} from './nodes/text-basics';
|
||||||
|
|
||||||
@ -29,6 +30,7 @@ export const documentExtensions: AnyExtension[] = [
|
|||||||
Paragraph,
|
Paragraph,
|
||||||
Heading,
|
Heading,
|
||||||
Blockquote,
|
Blockquote,
|
||||||
|
Section,
|
||||||
CodeBlock,
|
CodeBlock,
|
||||||
HorizontalRule,
|
HorizontalRule,
|
||||||
BulletList,
|
BulletList,
|
||||||
|
|||||||
@ -13,6 +13,12 @@ declare module '@tiptap/core' {
|
|||||||
setHorizontalRule: () => ReturnType;
|
setHorizontalRule: () => ReturnType;
|
||||||
setHardBreak: () => ReturnType;
|
setHardBreak: () => ReturnType;
|
||||||
};
|
};
|
||||||
|
documentSection: {
|
||||||
|
/** Wrap the selection in a styled section (issue #75). */
|
||||||
|
wrapInSection: (attrs: { pluginId: string; styleId: string }) => ReturnType;
|
||||||
|
/** Unwrap the nearest section, leaving its content in place. */
|
||||||
|
unwrapSection: () => ReturnType;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,6 +118,30 @@ export const Blockquote = Node.create({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const sectionSpec = nodeSpec('section');
|
||||||
|
export const Section = Node.create({
|
||||||
|
name: 'section',
|
||||||
|
group: sectionSpec.group,
|
||||||
|
content: sectionSpec.content,
|
||||||
|
defining: sectionSpec.defining,
|
||||||
|
addAttributes() {
|
||||||
|
return attributesFromSpec(sectionSpec);
|
||||||
|
},
|
||||||
|
...passthroughNodeIO(sectionSpec),
|
||||||
|
addCommands() {
|
||||||
|
return {
|
||||||
|
wrapInSection:
|
||||||
|
(attrs) =>
|
||||||
|
({ commands }) =>
|
||||||
|
commands.wrapIn(this.name, attrs),
|
||||||
|
unwrapSection:
|
||||||
|
() =>
|
||||||
|
({ commands }) =>
|
||||||
|
commands.lift(this.name),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const codeBlockSpec = nodeSpec('code_block');
|
const codeBlockSpec = nodeSpec('code_block');
|
||||||
export const CodeBlock = Node.create({
|
export const CodeBlock = Node.create({
|
||||||
name: 'code_block',
|
name: 'code_block',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user