mirror of
https://github.com/dagucloud/dagu.git
synced 2026-12-04 21:31:48 +00:00
Specs
Specs describe data-plane behavior. They are written for implementers and for black-box conformance tests.
Specs are implemented incrementally. A partial implementation must state the behavior it covers and must add black-box coverage for that behavior. Documented behavior remains normative even when product implementation has not caught up.
Status
This table describes conformance status.
Not implemented means the spec documents target conformance behavior.
It must not be treated as product behavior until implementation catches up.
Writing guidelines:
- Describe observable behavior in a way that cannot be misinterpreted.
- Write specs as observable contracts, not explanations of implementation.
- Keep each file focused on one topic.
- Keep each spec scoped to one owner and explicitly say what it does not define.
- Every numbered spec must include a
Statussection. - Every numbered spec must include a
Scopesection. - Name numbered specs with numeric prefixes to show reading order, such as
001-language.md. - Define observable behavior, errors, side effects, and lifecycle effects.
- Include examples that can be used as test fixtures.
- Do not require control-plane behavior.
- Remove obsolete functionality or behavior unless an owning spec explicitly keeps it.
- Do not add tests that verify a functionality or behavior is removed.
- Spec is not implementation note. Only document normative behavior.
Conformance test guidelines:
- Put each spec's black-box tests in
conformance/<spec_slug>. - Put workflow examples in static YAML fixtures under
conformance/<spec_slug>/testdata. - Keep Go conformance tests as small tables over fixture filenames and expected outcomes.
- Do not generate DAG YAML dynamically in Go test code.
- Add a new fixture when a behavior needs a new workflow shape.
- Keep setup helpers limited to runtime files or directories that the static fixture needs.
Each spec should document:
| Section | Purpose |
|---|---|
| Scope | Behavior covered by the spec. |
| Goal | The reason this behavior needs a spec. |
| Behavior | Required behavior. |
| Errors | Invalid input, runtime failure, timeout, abort, and cleanup behavior. |
| Examples | Minimal cases that can become black-box tests. |