Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
steps:
- uses: actions/checkout@v7.0.1

- uses: jdx/mise-action@v5.3.0
- uses: jdx/mise-action@v5.4.0
with:
install_args: actionlint shellcheck github:standards-lab/claude-plugins

Expand All @@ -110,7 +110,7 @@ jobs:
steps:
- uses: actions/checkout@v7.0.1

- uses: jdx/mise-action@v5.3.0
- uses: jdx/mise-action@v5.4.0
with:
install_args: go golangci-lint

Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
if: hashFiles(format('tools/{0}/*.slnx', matrix.tool)) != ''
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends clang zlib1g-dev

- uses: jdx/mise-action@v5.3.0
- uses: jdx/mise-action@v5.4.0
with:
working_directory: tools/${{ matrix.tool }}

Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
steps:
- uses: actions/checkout@v7.0.1

- uses: jdx/mise-action@v5.3.0
- uses: jdx/mise-action@v5.4.0
with:
install_args: go

Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
- name: Install the NativeAOT prerequisites
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends clang zlib1g-dev

- uses: jdx/mise-action@v5.3.0
- uses: jdx/mise-action@v5.4.0
with:
working_directory: tools/ooxml

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
if: hashFiles(format('tools/{0}/*.slnx', needs.tag.outputs.format)) != ''
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends clang zlib1g-dev

- uses: jdx/mise-action@v5.3.0
- uses: jdx/mise-action@v5.4.0
with:
working_directory: tools/${{ needs.tag.outputs.format }}

Expand Down
46 changes: 45 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,49 @@ tool under `tools/` keeps its own.

## [Unreleased]

## [v0.11.0] - 2026-11-28

This release adds the package `settings`, which holds a run's settings as one flat JSON object, so
a host that takes its bounds as JSON, rather than as cmd/docproc's `DOCPROC_` variables, reads,
validates, and assembles them into the shapes `stages.Build` and `dispatch.New` take. No existing
API changes, `dispatch.Version` stays "1", and the run directory's schema stays "2".

### Added

- Package `settings`, on the standard library and docproc's own packages alone. Its 21 keys are
each named for the `DOCPROC_` variable cmd/docproc reads it from, without the prefix and in
snake case: `tool_memory`, `unit_timeout`, `stream_idle`, `max_parts`, `max_bytes`,
`max_depth`, `bomb_ratio`, `bomb_size`, `archive_entries`, `claim_release`, `concurrency`,
`pdf_dpi`, `pdf_text`, `pdf_max_pixels`, `frame_max_side`, `magick_area`, `magick_memory`,
`magick_map`, `magick_disk`, `audio_limit`, and `output_writes`. The library sets no bound of its
own, so every key but four is required, and zero is no bound. The four optional keys, unset, take
a default: `concurrency` 1, `pdf_dpi` `document.DefaultDPI`, `audio_limit`
`audio.DefaultWindowLimit`, and `output_writes`, the most outputs one part writes to the content
store at once, 1. Set, `audio_limit` is over 4s and each other is at least 1. A duration is a
Go duration string, such as `"90s"`, and `bomb_ratio` and `bomb_size` are both zero, for no bomb
rule, or both above it. The [API page](docs/api.md#settings) states each key's format and the
field it lands in.
- `settings.Settings`, one pointer field per key, nil when unset, so an unset key is told from an
explicit zero; a Go caller sets a key with `new`.
- `settings.Decode`, which reads settings from one JSON object and validates them; input that
isn't one object, an unknown key, a value of the wrong JSON type, and trailing data are refused.
- `Settings.Validate`, which refuses settings a run can't take, each refusal naming its key, and
every unset required key in one error.
- `settings.ErrRequest`, which every refusal wraps.
- `settings.KeyError`, which refuses the values of the keys in its `Keys` for its `Reason`, so a
host names its own source for each key; it wraps `ErrRequest`.
- `settings.Run`, the settings in the library's shapes: the `stages.Options` a host passes
`stages.Build`, every option no key covers left at its zero value for the host to set; and the
`dispatch.Limits`, `Release`, and `OutputWrites`, as `Puts`, the host passes `dispatch.New` in
its `Config`.
- `Settings.Assemble`, which validates settings and returns their `Run`, each optional key left
unset at its default.

### Changed

- `picture.LibreOfficeImage` is `gotenberg/gotenberg:9.10.3-libreoffice`, from 9.10.2-libreoffice,
pinned by its multi-arch index digest.

## [v0.10.0] - 2026-11-27

This release captures each format's own metadata as a record output named `metadata`: an office
Expand Down Expand Up @@ -606,7 +649,8 @@ fixtures scripts stay in the spike.
The [limits page](docs/limits.md) states them: each stage's tool's limits, docproc-ooxml's
behavior under a memory bound, the Threader's memory, and the formats no stage reads.

[Unreleased]: https://github.com/standards-lab/docproc/compare/v0.10.0...HEAD
[Unreleased]: https://github.com/standards-lab/docproc/compare/v0.11.0...HEAD
[v0.11.0]: https://github.com/standards-lab/docproc/compare/v0.10.0...v0.11.0
[v0.10.0]: https://github.com/standards-lab/docproc/compare/v0.9.0...v0.10.0
[v0.9.0]: https://github.com/standards-lab/docproc/compare/v0.8.0...v0.9.0
[v0.8.0]: https://github.com/standards-lab/docproc/compare/v0.7.0...v0.8.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tags.
## Install

```sh
go get github.com/standards-lab/docproc@v0.10.0
go get github.com/standards-lab/docproc@v0.11.0
```

The module's releases are tagged `vX.Y.Z`, and [`CHANGELOG.md`](CHANGELOG.md) states what each
Expand Down
28 changes: 27 additions & 1 deletion cmd/docproc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ postgres modules, and each system tool under `tools/` keep their own.

## [Unreleased]

## [v0.2.9] - 2026-11-28

This release reads its run bounds through the docproc base module's new package `settings`, at
v0.11.0, and adds `DOCPROC_OUTPUT_WRITES`. Its exit codes and run directory's schema are
unchanged, and every existing variable keeps its meaning and its default.

### Added

- `DOCPROC_OUTPUT_WRITES`, the most outputs one part writes to the content store at once
(`dispatch.Config.Puts`), at least 1, so zero is refused; unset or empty, it is 1, the bound
`docproc run` held before.

### Changed

- The module requires the docproc base module at v0.11.0, whose
[CHANGELOG](../../CHANGELOG.md) states its changes in full. `docproc run` reads each
`DOCPROC_` variable into its key of a `settings.Settings` and assembles them into a
`settings.Run`, the bounds it passes `stages.Build` and `dispatch.New`. Each variable keeps its
meaning, its format, and its default, and `DOCPROC_CONCURRENCY` and `DOCPROC_PDF_DPI` still read
zero as their default. A refused value still fails `docproc run` before any tool is looked up,
and its message names the variable, such as `bounds: DOCPROC_OUTPUT_WRITES: 0 is below 1`.
- soffice runs in `gotenberg/gotenberg:9.10.3-libreoffice`, from 9.10.2-libreoffice, pinned by
its multi-arch index digest.
- The module requires go-core v0.14.0, from v0.12.0; nothing `docproc run` does changes with it.

## [v0.2.8] - 2026-11-27

This release requires the docproc base module at v0.10.0, whose changes reach `docproc run` as
Expand Down Expand Up @@ -319,7 +344,8 @@ and go-core v0.12.0, in place of the spike's port of go-cli-sdk v0.2.0's.
writes, read back through `rundir`, and the report it renders of a fixture run and of a killed
run.

[Unreleased]: https://github.com/standards-lab/docproc/compare/cmd/docproc/v0.2.8...HEAD
[Unreleased]: https://github.com/standards-lab/docproc/compare/cmd/docproc/v0.2.9...HEAD
[v0.2.9]: https://github.com/standards-lab/docproc/compare/cmd/docproc/v0.2.8...cmd/docproc/v0.2.9
[v0.2.8]: https://github.com/standards-lab/docproc/compare/cmd/docproc/v0.2.7...cmd/docproc/v0.2.8
[v0.2.7]: https://github.com/standards-lab/docproc/compare/cmd/docproc/v0.2.6...cmd/docproc/v0.2.7
[v0.2.6]: https://github.com/standards-lab/docproc/compare/cmd/docproc/v0.2.5...cmd/docproc/v0.2.6
Expand Down
4 changes: 3 additions & 1 deletion cmd/docproc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ go 1.27.4
require (
github.com/standards-lab/docproc v0.10.0
github.com/standards-lab/go-cli-sdk v0.4.0
github.com/standards-lab/go-core v0.12.0
github.com/standards-lab/go-core v0.14.0
golang.org/x/sys v0.50.0
)

require golang.org/x/text v0.44.0 // indirect

replace github.com/standards-lab/docproc => ../..
6 changes: 2 additions & 4 deletions cmd/docproc/go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
github.com/standards-lab/docproc v0.10.0 h1:4neT6syfThhNA9YmfHKMRt6OXt1MXSI9uJbFGOUE19k=
github.com/standards-lab/docproc v0.10.0/go.mod h1:ZA8JYQPooA6YA84b00Lpu5AiSL2VSj/u7QnenltqVBA=
github.com/standards-lab/go-cli-sdk v0.4.0 h1:232dyKPD5kqshp0BMEVEZaedwJfvnDVqWLv7m1NQWmI=
github.com/standards-lab/go-cli-sdk v0.4.0/go.mod h1:7Y1BCcHtuu8Unxc+Hryjlln+0fbiMYa5xY75aueJ/rY=
github.com/standards-lab/go-core v0.12.0 h1:sqrzK6QSppEYpwvVAyiWgzNuOsjfK0Kwe86GPuZpHsU=
github.com/standards-lab/go-core v0.12.0/go.mod h1:Yl/R+gM9YWczsePBCKXdPGh3FSdZ/5i8SapLIh3BDHU=
github.com/standards-lab/go-core v0.14.0 h1:n8FRpoCqE0HErfo5V1iWASipo3ORx36V6ESQhgFZ27E=
github.com/standards-lab/go-core v0.14.0/go.mod h1:Yl/R+gM9YWczsePBCKXdPGh3FSdZ/5i8SapLIh3BDHU=
golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs=
golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo=
Expand Down
4 changes: 3 additions & 1 deletion cmd/docproc/internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"github.com/standards-lab/go-core/graph"
"github.com/standards-lab/go-core/lifecycle"

"github.com/standards-lab/docproc/settings"

"github.com/standards-lab/docproc/cmd/docproc/internal/run"
)

Expand Down Expand Up @@ -60,7 +62,7 @@ func (a *App) Run(ctx context.Context, args []string) int {
// comment repeats it.
type Nodes struct {
LifecycleConfig *graph.Node[lifecycle.Config]
Bounds *graph.Node[Bounds]
Bounds *graph.Node[settings.Run]
StageBuilder *graph.Node[run.StageBuilder]
RunConfig *graph.Node[run.Config]
}
Expand Down
Loading