Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
ed85ad4
0.7.0 WP2: expose distribution in the package result
Nov 14, 2026
34753e0
0.7.0 WP4: moca_reader.age, decrypt-only age
Nov 14, 2026
3bca349
0.7.0 WP5: open encrypted packages
Nov 14, 2026
a80d358
0.7.0 WP6: the conformance adapter binds index.age
Nov 14, 2026
8fb05a7
0.7.0 WP6b: images, translations and tags; the envelope cover copy
Nov 14, 2026
30bcdd5
0.7.0 WP6c: the apps hint
Nov 14, 2026
407917f
WP6d: readingOrder and the search option upTo (moca-spec#9)
Nov 14, 2026
8b1c273
WP6d: upTo may be a descendant of a member; S008 when no reading orde…
Nov 14, 2026
0b58727
WP7: issued copies: two-pass verification, issuedCopies consent, L002…
Nov 14, 2026
7d014e3
WP8b: harden age decryption (never raise, validated limits and key re…
Nov 14, 2026
768492d
WP8c: read decrypted bytes in place and zero them; check the work-fac…
Nov 15, 2026
05b1333
WP9: version 0.7.0; CI pinned to the 0.7.0 release candidates
Nov 15, 2026
fe118a2
Release workflow: publish to PyPI on a version tag, through trusted p…
Nov 15, 2026
5596777
Podcast and video series content: media descriptions, datePublished, …
Nov 15, 2026
d682d25
nodes() sees bindings by composition (moca-spec 0.7, Reader contract …
Nov 15, 2026
1aabeb4
Two sources with one id are invalid (C002, package spec §5.1)
Nov 15, 2026
55284ad
CI: pin moca-spec, moca-reader-typescript and moca-tools to the 0.7.0…
Nov 15, 2026
d93b482
Conformance adapter: compare store allow paths normalised, so members…
Nov 15, 2026
c3576cd
Alternate media: alternateOf and sync, mapTime (moca-spec 0.7, packag…
Nov 15, 2026
b2bb04d
CI: pin moca-spec, moca-reader-typescript and moca-tools to the 0.7.0…
Nov 15, 2026
d618ef1
Bounded work for compositions and structure; source ids that are not …
Nov 15, 2026
2ec89b1
CI: pin moca-spec, moca-reader-typescript and moca-tools to the 0.7.0…
Nov 15, 2026
35d7f2c
Time ranges refined by a quote; composers limit members their signers…
Nov 15, 2026
70cdabe
CI: pin moca-spec, moca-reader-typescript and moca-tools to the 0.7.0…
Nov 15, 2026
0128fd6
CI: pin moca-spec, moca-reader-typescript and moca-tools to the 0.7.0…
Nov 15, 2026
77e6281
Linear refined quotes, open ranges on alternates, non-finite numbers,…
Nov 15, 2026
1d48ca7
CI: pin moca-spec, moca-reader-typescript and moca-tools to the 0.7.0…
Nov 15, 2026
152df60
Single file extensions: .mocae envelopes in tests and comments (packa…
Nov 15, 2026
f5b67f2
CI: pin moca-spec, moca-reader-typescript and moca-tools to the 0.7.0…
Nov 15, 2026
c9941da
tests: format after the .mocae rename
Nov 15, 2026
09cf73d
0.7.0: integers too large to be finite never raise, and one evidence …
Nov 15, 2026
d3c2de9
Tests: implicit keys of at most 1,024 characters, and integers too la…
Nov 15, 2026
f48e935
Release workflow: build and twine check on pull requests
Nov 16, 2026
7883b8a
Tests: a large composite package, not a long series; CI: pin moca-spe…
Nov 16, 2026
cc7a898
CI: pin moca-spec, moca-reader-typescript and moca-tools to the 0.7.0…
Nov 16, 2026
8c8cf7f
Search: filters come before the limit (moca-spec 0.7.0, contract §9.2)
Nov 16, 2026
d9ebd60
Search: alternative labels, ingress narrowing, a store's structure so…
Nov 16, 2026
29e0cf9
Credits (draft moca-spec 0.7.0): publisher object, url and contributors
Nov 17, 2026
fc7dc7d
CI: pack the guide's example from the moca-spec checkout; pin the Typ…
Nov 17, 2026
50dba6f
Merge pull request #12 from openmoca/draft/0.7.0-credits
petecleary Nov 17, 2026
b01af56
Schemas and codes: sync with moca-spec 0.7.0
Nov 21, 2026
f3ebe2d
Creators' terms, rights and dates (moca-spec 0.7.0, contract §15)
Nov 21, 2026
4d114ee
Hardening for moca-spec 0.7.0: Zip records, limits, signer binding
Nov 21, 2026
d0dc845
Harden reading: malformed input is reported, never raised
Nov 21, 2026
c9ac293
Linear scans for links, tags and script and style elements
Nov 21, 2026
6d57783
Directory source: never follow a link at any step of a path
Nov 21, 2026
ce022ab
Frontmatter: refuse YAML tags outside the core schema
Nov 21, 2026
1e2cead
LangChain and LlamaIndex retrievers: pass the host's terms request
Nov 21, 2026
df4d512
CHANGELOG, README and CI for moca-spec 0.7.0
Nov 21, 2026
fc2242f
Nesting limit: 64 levels, as moca-spec 0.7.0 fixes it
Nov 21, 2026
c38205c
Directory source on Windows: refuse links by checking each step
Nov 21, 2026
4f121d5
Retrievers apply a terms request by default
Nov 21, 2026
e053f10
CI: pin moca-spec and moca-reader-typescript to their release-0.7.0 h…
Nov 21, 2026
ee28e08
Merge pull request #18 from openmoca/draft/0.7.0-terms-rights
petecleary Nov 21, 2026
116e18c
CI: pin actions by commit SHA; pin the release build tools
Nov 21, 2026
92701ac
Merge pull request #19 from openmoca/ci/supply-chain
petecleary Nov 21, 2026
5510687
Merge remote-tracking branch 'origin/main' into ci/release-candidate
Nov 21, 2026
39809df
CI: pin the MOCA_*_REF commits to the heads of release-0.7.0 (0.7.0 r…
Nov 21, 2026
5d9cdfd
Merge pull request #20 from openmoca/ci/release-candidate
petecleary Nov 21, 2026
505be77
Front matter: every parser error is a diagnostic; JSON nesting check:…
Nov 21, 2026
bfc0212
Structure: nesting is limited to 64 levels, fixed
Nov 21, 2026
6d62736
Merge pull request #21 from openmoca/draft/0.7.0-frontmatter-backstop
petecleary Nov 21, 2026
1a52692
Schemas: terms, citation record and catalogue entry from moca-spec (A…
Nov 21, 2026
2b522d7
Terms: ai.allowed.mention, and closed and hidden for a request (ADR-0…
Nov 21, 2026
f05b4fa
Search: U004 counts excluded and hidden; relation ids name no hidden …
Nov 21, 2026
b00ac36
Ingest with a terms request (ADR-0041)
Nov 21, 2026
7e61e59
Library.catalogue and Library.structure_for (ADR-0041)
Nov 21, 2026
bfce3fc
Library.search takes terms; the bindings always pass a terms request,…
Nov 21, 2026
49bfe5f
CI: pin moca-spec and moca-reader-typescript to the release-0.7.0 hea…
Nov 21, 2026
7f8d583
Merge pull request #22 from openmoca/draft/0.7.0-terms-gate-coverage
petecleary Nov 21, 2026
221cdd6
CI: pin the MOCA_*_REF commits to the heads of release-0.7.0 (0.7.0 r…
Nov 22, 2026
ac9bf9f
Merge pull request #23 from openmoca/ci/release-candidate-2
petecleary Nov 22, 2026
e1e653b
Structure: prefix declarations are found in one pass
Nov 22, 2026
cd88f95
Merge pull request #24 from openmoca/fix/structure-prefix-scan
petecleary Nov 22, 2026
c96dac6
CI: pin the Readers to the heads of release-0.7.0 (0.7.0 release cand…
Nov 22, 2026
eb80089
Merge pull request #25 from openmoca/ci/release-candidate-3
petecleary Nov 22, 2026
56ad990
CI: pin the MOCA_*_REF commits to the heads of release-0.7.0
Nov 22, 2026
59f0e3e
Merge pull request #26 from openmoca/ci/release-candidate-4
petecleary Nov 22, 2026
1313175
CI: pin MOCA_*_REF to the v0.7.0 tag commits
Nov 22, 2026
67ae930
Merge pull request #27 from openmoca/ci/release-0.7.0-tags
petecleary Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
# have the same line endings on every platform.
* text=auto eol=lf
*.zip binary
# C2SP age test vectors test exact bytes, CR and CRLF included.
tests/fixtures/cctv-age/** binary
8 changes: 8 additions & 0 deletions .github/build-constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# The build backend and its dependencies, pinned exactly for the release build (release.yml: uv build
# --build-constraints). To update: echo "hatchling==X.Y.Z" | uv pip compile - --no-header --no-annotate
hatchling==1.33.0
packaging==26.3
pathspec==1.1.1
pluggy==1.7.0
tomlkit==0.15.2
trove-classifiers==2026.9.21.13
91 changes: 91 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Release

# Push a vX.Y.Z tag on a commit in main: builds moca-reader and its bindings, and publishes them to PyPI,
# moca-reader first, then moca-reader-langchain and moca-reader-llamaindex, which pin it at the same version.
# On a pull request to main, the same checks run and the same files are built and checked with twine, so the
# release path is proved before release day; nothing is published.
#
# Trusted publishing: PyPI accepts this workflow, in the `release` environment, through a short-lived
# OIDC token from GitHub Actions. There is no PyPI token in this repository. The upload action also
# publishes a signed attestation for each file.
on:
push:
tags: ['v*']
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:
name: Check and build (dry run)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0
# The tools that make the release files are pinned exactly: uv here, the build backend in
# .github/build-constraints.txt, and twine below.
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '0.13.9'
- name: The tag is on main and every version matches it (on a pull request, matches the reader's)
run: |
if [ "$GITHUB_EVENT_NAME" = push ]; then
git merge-base --is-ancestor "$GITHUB_SHA" origin/main || { echo "::error::$GITHUB_REF_NAME is not on main"; exit 1; }
want="${GITHUB_REF_NAME#v}"
else
want=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
fi
for f in pyproject.toml packages/*/pyproject.toml; do
v=$(sed -n 's/^version = "\(.*\)"/\1/p' "$f")
[ "$v" = "$want" ] || { echo "::error::$f is $v, the tag is $GITHUB_REF_NAME"; exit 1; }
done
grep -q "^__version__ = \"$want\"" src/moca_reader/__init__.py || { echo "::error::__version__ does not match $GITHUB_REF_NAME"; exit 1; }
for f in packages/*/pyproject.toml; do
grep -q "\"moca-reader==$want\"" "$f" || { echo "::error::$f does not pin moca-reader==$want"; exit 1; }
done
- run: uv build --package moca-reader -o dist/reader --build-constraints .github/build-constraints.txt
- run: |
uv build --package moca-reader-langchain -o dist/bindings --build-constraints .github/build-constraints.txt
uv build --package moca-reader-llamaindex -o dist/bindings --build-constraints .github/build-constraints.txt
- run: uvx twine@7.0.0 check --strict dist/reader/* dist/bindings/*
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist
path: dist/

reader:
name: Publish moca-reader
needs: build
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
with:
packages-dir: dist/reader/

bindings:
name: Publish the bindings
needs: reader
if: github.event_name == 'push'
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
with:
packages-dir: dist/bindings/
73 changes: 45 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ permissions:
# The other MOCA repositories, at fixed refs: release tags, or commits while a Spec Change
# Proposal is in flight; never a branch (moca-spec CONTRIBUTING.md).
env:
MOCA_SPEC_REF: v0.6.0
MOCA_READER_TYPESCRIPT_REF: v0.6.0
MOCA_TOOLS_REF: v0.6.0
MOCA_SPEC_REF: 9adec0e95c978fda6a16bfda01970ede5f78754b # v0.7.0
MOCA_READER_TYPESCRIPT_REF: 26c617b8a3789d30d89ce1af6a2e11c983e475f8 # v0.7.0
MOCA_TOOLS_REF: 010e4049142c218de2062919b0fe45e595dde4ad # v0.7.0

jobs:
deps:
name: Public dependencies only
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
path: moca-reader-python
# The check lives in moca-spec, the one copy every open repository runs.
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository_owner }}/moca-spec
ref: ${{ env.MOCA_SPEC_REF }}
path: moca-spec
# Read access to the other MOCA repos while they are private.
token: ${{ secrets.MOCA_REPOS_TOKEN || github.token }}
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
- run: node moca-spec/scripts/check-deps.mjs moca-reader-python
Expand All @@ -50,54 +50,65 @@ jobs:
python: ['3.11', '3.14']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
path: moca-reader-python
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository_owner }}/moca-spec
ref: ${{ env.MOCA_SPEC_REF }}
path: moca-spec
token: ${{ secrets.MOCA_REPOS_TOKEN || github.token }}
- uses: astral-sh/setup-uv@v6
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
python-version: ${{ matrix.python }}
- run: uv sync --locked
working-directory: moca-reader-python
- run: uv run ruff check && uv run ruff format --check && uv run mypy
working-directory: moca-reader-python
# The Go age CLI (pinned, checksum-checked) for the age cross-check. On Linux it is required, so the
# cross-check can never skip there (MOCA_REQUIRE_GO_AGE).
- name: Install the Go age CLI
if: runner.os == 'Linux'
run: |
curl -fsSLo "$RUNNER_TEMP/age.tar.gz" https://github.com/FiloSottile/age/releases/download/v1.3.2/age-v1.3.2-linux-amd64.tar.gz
echo "cbe24006683f8eb669266162894b9a522a1af52f2665fbc63a4bb032ed26ac10 $RUNNER_TEMP/age.tar.gz" | sha256sum -c -
tar -xzf "$RUNNER_TEMP/age.tar.gz" -C "$RUNNER_TEMP"
echo "$RUNNER_TEMP/age" >> "$GITHUB_PATH"
- run: uv run pytest
working-directory: moca-reader-python
env:
MOCA_REQUIRE_GO_AGE: ${{ runner.os == 'Linux' && '1' || '' }}

corpus:
name: Corpus and parity with the reference Reader
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
path: moca-reader-python
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository_owner }}/moca-spec
ref: ${{ env.MOCA_SPEC_REF }}
path: moca-spec
token: ${{ secrets.MOCA_REPOS_TOKEN || github.token }}
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository_owner }}/moca-reader-typescript
ref: ${{ env.MOCA_READER_TYPESCRIPT_REF }}
path: moca-reader-typescript
token: ${{ secrets.MOCA_REPOS_TOKEN || github.token }}
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository_owner }}/moca-tools
ref: ${{ env.MOCA_TOOLS_REF }}
path: moca-tools
token: ${{ secrets.MOCA_REPOS_TOKEN || github.token }}
- uses: astral-sh/setup-uv@v6
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
python-version: '3.14'
- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
- run: uv sync --locked
Expand All @@ -119,43 +130,49 @@ jobs:
name: Getting-started guide
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
path: moca-reader-python
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository_owner }}/moca-spec
ref: ${{ env.MOCA_SPEC_REF }}
path: moca-spec
token: ${{ secrets.MOCA_REPOS_TOKEN || github.token }}
# moca-spec's corpus runner links the reference Reader and moca-tools until they are on npm.
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository_owner }}/moca-reader-typescript
ref: ${{ env.MOCA_READER_TYPESCRIPT_REF }}
path: moca-reader-typescript
token: ${{ secrets.MOCA_REPOS_TOKEN || github.token }}
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
repository: ${{ github.repository_owner }}/moca-tools
ref: ${{ env.MOCA_TOOLS_REF }}
path: moca-tools
token: ${{ secrets.MOCA_REPOS_TOKEN || github.token }}
- uses: actions/setup-python@v5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
- uses: astral-sh/setup-uv@v6
- uses: actions/setup-node@v4
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
- run: npm ci
working-directory: moca-reader-typescript
- run: npm ci
working-directory: moca-tools
- name: Example package from the moca-spec release
env:
GH_TOKEN: ${{ secrets.MOCA_REPOS_TOKEN || github.token }}
run: gh release download v0.6.0 -R ${{ github.repository_owner }}/moca-spec -p support-kb.moca -p example-trust-root.json -D "$RUNNER_TEMP/assets"
# Until v0.7.0 is released, support-kb and the example trust root are packed from the moca-spec checkout:
# v0.6.0's support-kb has a string publisher, which 0.7.0 refuses (M002).
- run: npm ci
working-directory: moca-spec
- name: Example package from the moca-spec checkout
run: |
mkdir -p "$RUNNER_TEMP/assets"
node node_modules/@openmoca/moca-lint/bin/moca-lint.js pack examples/support-kb -o "$RUNNER_TEMP/assets/support-kb.moca" --trust-root fixtures/signing-keys/trust-root.json
cp fixtures/signing-keys/trust-root.json "$RUNNER_TEMP/assets/example-trust-root.json"
working-directory: moca-spec
- run: uv build --out-dir "$RUNNER_TEMP/dist"
working-directory: moca-reader-python
# Until moca-reader is on PyPI and the repositories are public: install the wheel built from this
Expand All @@ -164,6 +181,6 @@ jobs:
- run: >-
node ../moca-spec/scripts/run-guide.mjs docs/getting-started.md
--replace "pip install moca-reader=>pip install $RUNNER_TEMP/dist/moca_reader-*.whl"
--replace "https://github.com/openmoca/moca-spec/releases/download/v0.6.0/=>file://$RUNNER_TEMP/assets/"
--replace "git clone --depth 1 --branch v0.6.0 https://github.com/openmoca/moca-spec.git=>ln -s $GITHUB_WORKSPACE/moca-spec moca-spec"
--replace "https://github.com/openmoca/moca-spec/releases/download/v0.7.0/=>file://$RUNNER_TEMP/assets/"
--replace "git clone --depth 1 --branch v0.7.0 https://github.com/openmoca/moca-spec.git=>ln -s $GITHUB_WORKSPACE/moca-spec moca-spec"
working-directory: moca-reader-python
Loading
Loading