24 - the conformance gates live in src/conformance/ #123
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"categories": { "correctness": "off" },
|
||||
"ignorePatterns": ["src/**/*.test.ts", "src/property-harness.ts"],
|
||||
"ignorePatterns": ["src/**/*.test.ts", "src/conformance/property-harness.ts"],
|
||||
"rules": {
|
||||
"eslint/max-lines-per-function": ["error", { "IIFEs": true, "max": 52, "skipBlankLines": false, "skipComments": false }]
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ editor wrote; the CommonMark spec suite against `markdownToAdf` and `markdownToH
|
||||
Beside the corpus, properties run over documents generated from the node tables and over generated
|
||||
markdown, on a fixed seed in the gate; `PROPERTY_RUNS=<runs>` raises the runs and randomizes the
|
||||
seed for local digging, and a counterexample found becomes a round-trip fixture. The generators and
|
||||
run parameters properties share live in `src/property-harness.ts`, outside the build and coverage.
|
||||
run parameters properties share live in `src/conformance/property-harness.ts`, outside the build and coverage.
|
||||
|
||||
`spec/flavour.md` is read as a source too, so the node tables cannot drift from the prose they
|
||||
copy: each `- ` bullet in `## Block nodes`, `## Inline nodes` and `## Marks` declares the nodes
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"size-ratchet": "oxlint --deny-warnings -c .oxlintrc.json src",
|
||||
"test": "node --test --experimental-test-coverage --test-coverage-exclude=\"src/**/*.test.ts\" --test-coverage-exclude=src/property-harness.ts --test-coverage-branches=98 --test-coverage-functions=100 --test-coverage-lines=100 \"src/**/*.test.ts\"",
|
||||
"test": "node --test --experimental-test-coverage --test-coverage-exclude=\"src/**/*.test.ts\" --test-coverage-exclude=src/conformance/property-harness.ts --test-coverage-branches=98 --test-coverage-functions=100 --test-coverage-lines=100 \"src/**/*.test.ts\"",
|
||||
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.build.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -3,9 +3,9 @@ import fc from 'fast-check'
|
||||
import test from 'node:test'
|
||||
|
||||
import { adfDocument, propertyRuns, propertyTimeout } from './property-harness.ts'
|
||||
import { adfToMarkdown } from './markdown/emit/adf-to-markdown.ts'
|
||||
import { markdownToAdf } from './markdown/parse/markdown-to-adf.ts'
|
||||
import { toEditorNormal } from './adf/editor-normal.ts'
|
||||
import { adfToMarkdown } from '../markdown/emit/adf-to-markdown.ts'
|
||||
import { markdownToAdf } from '../markdown/parse/markdown-to-adf.ts'
|
||||
import { toEditorNormal } from '../adf/editor-normal.ts'
|
||||
|
||||
const gateRuns = 1600
|
||||
|
||||
@@ -5,11 +5,11 @@ import { fileURLToPath } from 'node:url'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
|
||||
import type { AttributeKind, AttributeVocabulary } from './adf/attribute-vocabulary.ts'
|
||||
import { blockArgument } from './markdown/block-directive.ts'
|
||||
import { blockNodes } from './adf/block-nodes.ts'
|
||||
import { inlineNodes } from './adf/inline-nodes.ts'
|
||||
import { markAttributes } from './adf/mark-attributes.ts'
|
||||
import type { AttributeKind, AttributeVocabulary } from '../adf/attribute-vocabulary.ts'
|
||||
import { blockArgument } from '../markdown/block-directive.ts'
|
||||
import { blockNodes } from '../adf/block-nodes.ts'
|
||||
import { inlineNodes } from '../adf/inline-nodes.ts'
|
||||
import { markAttributes } from '../adf/mark-attributes.ts'
|
||||
|
||||
type Held = Map<string, Set<AttributeKind>>
|
||||
type Properties = Map<string, SchemaObject[]>
|
||||
@@ -21,7 +21,7 @@ const definitionReference = '#/definitions/'
|
||||
const gaps: string[] = []
|
||||
const grammarOwn = ['doc', 'text']
|
||||
const readKeywords = ['$ref', 'additionalProperties', 'allOf', 'anyOf', 'enum', 'items', 'maxItems', 'maximum', 'minItems', 'minLength', 'minimum', 'pattern', 'properties', 'required', 'type']
|
||||
const root = join(dirname(fileURLToPath(import.meta.url)), '..', 'spec', 'adf-schema')
|
||||
const root = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'spec', 'adf-schema')
|
||||
const schemaFiles = ['full.json', 'stage-0.json']
|
||||
|
||||
test('the ADF JSON Schemas are @atlaskit/adf-schema 57.4.9, vendored byte-exact', () => {
|
||||
@@ -5,11 +5,11 @@ import { fileURLToPath } from 'node:url'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
|
||||
import type { AdfDocument, AdfNode } from './adf/document.ts'
|
||||
import { adfToMarkdown } from './markdown/emit/adf-to-markdown.ts'
|
||||
import { markdownToAdf } from './markdown/parse/markdown-to-adf.ts'
|
||||
import type { AdfDocument, AdfNode } from '../adf/document.ts'
|
||||
import { adfToMarkdown } from '../markdown/emit/adf-to-markdown.ts'
|
||||
import { markdownToAdf } from '../markdown/parse/markdown-to-adf.ts'
|
||||
|
||||
const root = join(dirname(fileURLToPath(import.meta.url)), '..', 'corpus', 'commonmark-spec')
|
||||
const root = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'corpus', 'commonmark-spec')
|
||||
const checks = ['count', 'fixpoint', 'text'] as const
|
||||
|
||||
type Check = (typeof checks)[number]
|
||||
@@ -4,14 +4,14 @@ import { fileURLToPath } from 'node:url'
|
||||
import { readFileSync, readdirSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
|
||||
import { adfToMarkdown } from './markdown/emit/adf-to-markdown.ts'
|
||||
import { isAdfDocument } from './adf/document.ts'
|
||||
import { isJsonValue } from './json-value.ts'
|
||||
import { markdownToAdf } from './markdown/parse/markdown-to-adf.ts'
|
||||
import { serializeCanonicalJson } from './canonical-json.ts'
|
||||
import { toEditorNormal } from './adf/editor-normal.ts'
|
||||
import { adfToMarkdown } from '../markdown/emit/adf-to-markdown.ts'
|
||||
import { isAdfDocument } from '../adf/document.ts'
|
||||
import { isJsonValue } from '../json-value.ts'
|
||||
import { markdownToAdf } from '../markdown/parse/markdown-to-adf.ts'
|
||||
import { serializeCanonicalJson } from '../canonical-json.ts'
|
||||
import { toEditorNormal } from '../adf/editor-normal.ts'
|
||||
|
||||
const corpusRoot = join(dirname(fileURLToPath(import.meta.url)), '..', 'corpus')
|
||||
const corpusRoot = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'corpus')
|
||||
const errorsRoot = join(corpusRoot, 'errors')
|
||||
const normalizationRoot = join(corpusRoot, 'normalization')
|
||||
const realPayloadsRoot = join(corpusRoot, 'real-payloads')
|
||||
@@ -4,15 +4,15 @@ import { fileURLToPath } from 'node:url'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
|
||||
import type { AttributeKind, AttributeVocabulary } from './adf/attribute-vocabulary.ts'
|
||||
import { blockNodes } from './adf/block-nodes.ts'
|
||||
import { inlineNodes } from './adf/inline-nodes.ts'
|
||||
import { markAttributes } from './adf/mark-attributes.ts'
|
||||
import { textDirectiveName } from './markdown/text-directive.ts'
|
||||
import type { AttributeKind, AttributeVocabulary } from '../adf/attribute-vocabulary.ts'
|
||||
import { blockNodes } from '../adf/block-nodes.ts'
|
||||
import { inlineNodes } from '../adf/inline-nodes.ts'
|
||||
import { markAttributes } from '../adf/mark-attributes.ts'
|
||||
import { textDirectiveName } from '../markdown/text-directive.ts'
|
||||
|
||||
type Declared = { attributes: AttributeVocabulary }
|
||||
|
||||
const specPath = join(dirname(fileURLToPath(import.meta.url)), '..', 'spec', 'flavour.md')
|
||||
const specPath = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'spec', 'flavour.md')
|
||||
const introducer = 'Attributes: '
|
||||
const codeFence = /^`{3,}/
|
||||
const directiveName = /`([a-z][A-Za-z0-9]*)`/g
|
||||
@@ -2,16 +2,16 @@ import assert from 'node:assert/strict'
|
||||
import fc from 'fast-check'
|
||||
import test from 'node:test'
|
||||
|
||||
import type { AdfDocument } from './adf/document.ts'
|
||||
import type { AdfDocument } from '../adf/document.ts'
|
||||
import type { Arbitrary, DepthIdentifier } from 'fast-check'
|
||||
import type { AttributeVocabulary } from './adf/attribute-vocabulary.ts'
|
||||
import type { JsonValue } from './json-value.ts'
|
||||
import type { Result } from './result.ts'
|
||||
import type { AttributeVocabulary } from '../adf/attribute-vocabulary.ts'
|
||||
import type { JsonValue } from '../json-value.ts'
|
||||
import type { Result } from '../result.ts'
|
||||
import { adfDocument, attributes, jsonKey, jsonValue, markdownPieces, propertyRuns, propertyTimeout, textOf } from './property-harness.ts'
|
||||
import { adfToMarkdown } from './markdown/emit/adf-to-markdown.ts'
|
||||
import { blockArgument, listBreakName, marksAttribute } from './markdown/block-directive.ts'
|
||||
import { blockNodes } from './adf/block-nodes.ts'
|
||||
import { carryName } from './markdown/opaque-carry.ts'
|
||||
import { adfToMarkdown } from '../markdown/emit/adf-to-markdown.ts'
|
||||
import { blockArgument, listBreakName, marksAttribute } from '../markdown/block-directive.ts'
|
||||
import { blockNodes } from '../adf/block-nodes.ts'
|
||||
import { carryName } from '../markdown/opaque-carry.ts'
|
||||
import {
|
||||
directivePrefix,
|
||||
spellAttributes,
|
||||
@@ -22,17 +22,17 @@ import {
|
||||
spellJsonAttribute,
|
||||
spellStringAttribute,
|
||||
spellVocabulary,
|
||||
} from './markdown/directive-syntax.ts'
|
||||
import { fencedCodeBlock } from './markdown/commonmark/backtick-runs.ts'
|
||||
import { inlineNodes } from './adf/inline-nodes.ts'
|
||||
import { markAttributes } from './adf/mark-attributes.ts'
|
||||
import { markSpelling } from './markdown/mark-spellings.ts'
|
||||
import { markdownToAdf } from './markdown/parse/markdown-to-adf.ts'
|
||||
import { nodeContent, nodeMarks } from './adf/document.ts'
|
||||
import { serializeCanonicalJson } from './canonical-json.ts'
|
||||
import { textDirectiveName } from './markdown/text-directive.ts'
|
||||
import { toEditorNormal } from './adf/editor-normal.ts'
|
||||
import { vocabularyPairs } from './adf/attribute-vocabulary.ts'
|
||||
} from '../markdown/directive-syntax.ts'
|
||||
import { fencedCodeBlock } from '../markdown/commonmark/backtick-runs.ts'
|
||||
import { inlineNodes } from '../adf/inline-nodes.ts'
|
||||
import { markAttributes } from '../adf/mark-attributes.ts'
|
||||
import { markSpelling } from '../markdown/mark-spellings.ts'
|
||||
import { markdownToAdf } from '../markdown/parse/markdown-to-adf.ts'
|
||||
import { nodeContent, nodeMarks } from '../adf/document.ts'
|
||||
import { serializeCanonicalJson } from '../canonical-json.ts'
|
||||
import { textDirectiveName } from '../markdown/text-directive.ts'
|
||||
import { toEditorNormal } from '../adf/editor-normal.ts'
|
||||
import { vocabularyPairs } from '../adf/attribute-vocabulary.ts'
|
||||
|
||||
type Choice = { arbitrary: Arbitrary<string>; hostile?: true; weight: number }
|
||||
|
||||
@@ -2,16 +2,16 @@ import assert from 'node:assert/strict'
|
||||
import { env } from 'node:process'
|
||||
import fc from 'fast-check'
|
||||
|
||||
import type { AdfAttributes, AdfDocument, AdfMark, AdfNode } from './adf/document.ts'
|
||||
import type { AdfAttributes, AdfDocument, AdfMark, AdfNode } from '../adf/document.ts'
|
||||
import type { Arbitrary } from 'fast-check'
|
||||
import type { AttributeKind, AttributeVocabulary } from './adf/attribute-vocabulary.ts'
|
||||
import type { JsonValue } from './json-value.ts'
|
||||
import { blockArgument } from './markdown/block-directive.ts'
|
||||
import { blockNodes } from './adf/block-nodes.ts'
|
||||
import { directivePrefix } from './markdown/directive-syntax.ts'
|
||||
import { inlineNodes } from './adf/inline-nodes.ts'
|
||||
import { markAttributes } from './adf/mark-attributes.ts'
|
||||
import { toEditorNormal } from './adf/editor-normal.ts'
|
||||
import type { AttributeKind, AttributeVocabulary } from '../adf/attribute-vocabulary.ts'
|
||||
import type { JsonValue } from '../json-value.ts'
|
||||
import { blockArgument } from '../markdown/block-directive.ts'
|
||||
import { blockNodes } from '../adf/block-nodes.ts'
|
||||
import { directivePrefix } from '../markdown/directive-syntax.ts'
|
||||
import { inlineNodes } from '../adf/inline-nodes.ts'
|
||||
import { markAttributes } from '../adf/mark-attributes.ts'
|
||||
import { toEditorNormal } from '../adf/editor-normal.ts'
|
||||
|
||||
type Positions = { block: AdfNode; inline: AdfNode }
|
||||
|
||||
@@ -1038,6 +1038,13 @@ The done `todo.md` items in full, as they were written. `todo.md` keeps a one-li
|
||||
attribute and the `listBreak` spelling — what the block directive spells of a node that the
|
||||
grammar does not — and `src/markdown/` drops from 15 entries to 12.
|
||||
|
||||
- [x] **24 — The conformance gates have a directory (`0.2.0`).** Six root tests with no sibling
|
||||
source (`adf-property`, `adf-schema`, `commonmark-spec`, `corpus`, `flavour`,
|
||||
`markdown-property`) plus `property-harness.ts` are the machinery that makes the docs
|
||||
executable, and they read as leftovers. Give them one, so `src/` root shows what it holds.
|
||||
**Done** (2026-09-23): `src/conformance/` holds the six gate tests and the property harness,
|
||||
so `src/` root is the four primitives and the entrypoint.
|
||||
|
||||
## 5 — Ship `0.1.0`
|
||||
|
||||
- [ ] **5 — Ship `0.1.0`.** Only the maintainer's own acts are left (§15): make the Gitea repo
|
||||
|
||||
@@ -56,10 +56,7 @@ chunk clearing a §11 seam.
|
||||
upward, so the first raise to the measured figure reddens a run that changed nothing. Make
|
||||
the measurement repeatable, or state the number the floor may be raised to and why it is not
|
||||
the measured one.
|
||||
- [ ] **24 — The conformance gates have a directory (`0.2.0`).** Six root tests with no sibling
|
||||
source (`adf-property`, `adf-schema`, `commonmark-spec`, `corpus`, `flavour`,
|
||||
`markdown-property`) plus `property-harness.ts` are the machinery that makes the docs
|
||||
executable, and they read as leftovers. Give them one, so `src/` root shows what it holds.
|
||||
- [x] **24 — The conformance gates have a directory (`0.2.0`).**
|
||||
- [ ] **25 — AGENTS.md §8 and §11 are findable (`0.2.0`).** Both are single unindexed paragraphs
|
||||
holding the answer to nearly every question the panel had, and six readers and both
|
||||
architects independently reported that finding the sentence cost more than reading the code
|
||||
|
||||
+1
-1
@@ -27,6 +27,6 @@
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"exclude": ["src/**/*.test.ts", "src/property-harness.ts"],
|
||||
"exclude": ["src/**/*.test.ts", "src/conformance/property-harness.ts"],
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user