Private preview. Daggry is not publicly released.Roadmap
Skip to content

Bindings ​

Reference

Daggry's files work for any kind of work, so something must say what a workspace, a work item and a result are for your kind of work. A binding does that: it is a ready-made setup for one kind of work and one set of tools. This page says what a binding is, defines the software binding in full and sketches a binding for work that is not software. Read it if you set up a factory for one kind of work, or if you write a binding of your own.

Everything on the other reference pages holds for every binding. Text that is true of one kind of work only is on this page.

What a binding is ​

A binding is a ready-made setup for one kind of work and one set of tools. It is a named set of adapters, validators, kinds, effects and conventions. A tenant registers a binding and its parts in the Tenant config, and each project entry names the binding its workspace uses. The table lists what a binding gives.

A binding givesWhich isRegistered in
A workspace conventionWhat a workspace is, how one is named and what names a version of it.extensions.bindings, by the binding's name and version.
A work item conventionWhere a request comes from and how it is referred to.The same entry.
A change conventionWhat a change is, and how a person accepts one into the workspace.The same entry.
AdaptersPrograms that turn a tool's own output into a result document.extensions.adapters, as <namespace>/<adapter>.
ValidatorsNative validators for the binding's kind of work.validators.native. See Validators.
EffectsThe side effects a workflow's effect step can name, such as handing a change over.extensions.effects.
LabelsRecommended values of a validator's kind and an area's role.Nowhere. Labels are an open vocabulary.
Protected pathsPaths the binding adds to the always-protected set.With the binding. See Protected paths.

These rules hold for every binding.

  • A binding adds and never changes. It adds names in its own namespace. It changes no key, no kind and no rule of the open formats.
  • A binding owns its namespace. The adapters of the software binding are software/<adapter>. Another party's binding uses another namespace.
  • Daggry reads no tool's format. A factory reads exit-code and document itself. Every other format is an adapter's.
  • A workflow stays the same. A workflow names validators and effects by reference. The same workflow runs under two bindings when both give the names it uses.

The same names for any work ​

The open formats use general names, so one set of files describes any kind of work. The table gives the general name for each thing in a software run.

In the software bindingIn every binding
An issueA work item: the request the work answers.
A repositoryA workspace: the versioned collection of files and data the work lives in.
A range of commitsA change: a set of differences made to the workspace.
A test that fails, then passesA baseline proof: a proof that fails before the work and passes after it.
Opening a pull requestAn effect: the step that delivers the result.

The software binding ​

The software binding is for workspaces that hold programs.

Conventions ​

The table says what each general term is in the software binding.

General termIn the software binding
WorkspaceA git repository on a forge, named <owner>/<name>.
Version of the workspaceA commit, named by its 40 lowercase hex digits. This is the form of every revision.
BaselineThe base commit: the commit a run starts from.
ChangeA commit range on the run's branch, daggry/<run-id>. A change record holds the last commit, the paths the range changed and the frozen set. A frozen path's digest is the file's git blob id.
Work itemAn issue on the forge, referred to by its URL: https://github.com/<owner>/<name>/issues/<n>. The work-item record holds repository and issue. See Record kinds.
Accepting a changeA person merges a pull request. The project config and the other protected files change this way only.
Approval by commentA verified comment on the issue or the pull request. Its id is the source_ref of the approval.
ForgeThe git host that holds the repository, the issues and the pull requests. The runner pushes to the run's branch with a token scoped to one repository, and the control plane rechecks a change from the forge's own view of the commits. The forge's application key never enters a pod.

Effects ​

The software binding defines one effect.

EffectWhat it does
open-prOpens a pull request with head daggry/<run-id> and base main. The title and body come from the issue. The idempotency key is the run id plus the step id, so a retry returns the same pull request.

Adapters ​

Each adapter reads one output format and writes a result document. The three test adapters give one finding for each test, and the finding's id is the test's name in the report.

AdapterReadsresult.pathFindings
software/libtestThe result lines that Rust's test harness prints on standard output and standard error.Not used.One per result line: pass for ok, fail for FAILED, skip for ignored.
software/junitA JUnit XML report.Required.One per testcase element: pass, fail, or skip when skipped.
software/tapTest Anything Protocol version 13 or 14, on standard output or at the path.Optional.One per test point: pass for ok, fail for not ok, skip for a SKIP directive.
software/sarifA SARIF 2.1.0 document, on standard output or at the path.Optional.One per result. The id is the rule id, the outcome is fail when the level is error and pass otherwise, the locator is the first location, and the message is the result's message text.

Each test adapter writes three metrics, passed, failed and skipped, and sets the document's outcome to fail when a test failed. software/sarif writes errors and warnings and sets the outcome to fail when a result is at level error. For all four, a report that is missing or does not parse gives the outcome error.

A measurement sealed from a test adapter also holds the optional tests field: one record for each finding, with the test's name and an outcome of passed, failed or ignored. The findings are the authority. See evidence/measurement@1.

software/libtest ​

The adapter keeps one finding for each result line.

LineFinding
test <name> ... okpass, with the id <name>.
test <name> ... FAILEDfail.
test <name> ... ignored or test <name> ... ignored, <reason>skip.

The adapter skips every other line, such as headers, summaries and log output. It drops a - should panic suffix from a name. It also skips the lines between a line that reads failures: and the next line that starts with test result:, because a failed test prints its captured output there. The exit code and the findings are independent: a run that exits non-zero and prints ok lines for some tests still gives pass findings for those tests.

cargo test prints these lines with no change. Any other program can print the same lines.

Validators ​

The software binding adds no validator of its own. It uses the built-in validators through its adapters, and each has a test form.

Built-in validatorIn the software binding
daggry/criterion-coverageA criterion is covered when a passing test carries its id in its name. AC-1 is carried by tests::ac_1_rejects_empty.
daggry/baseline-proofThe red proof: a new test fails on the base commit, which shows that the test says something about the change. A run with no test records, such as a compile failure, is not red.
daggry/base-relativetests_removed counts tests in the base commit's result that the head lacks. tests_newly_skipped counts tests that are skipped in the head and not in the base.

The definitions are in Built-in validators.

Frozen tests ​

In the software binding the frozen paths of a run are tests. A test step is an agent step whose freeze globs match test files. The step's tests key is a second name for freeze with the same meaning, and a step holds one of the two. After the step is sealed, no later step changes a frozen test. daggry approve <run-id> --unfreeze <path> frees one test path for one iteration. The rules are in Frozen paths.

Labels ​

The table lists the labels the software binding recommends.

Label ofRecommended values
A validator's kindtests, lint, format, types, build, coverage, security, custom.
An area's rolesource, tests, docs, config, generated, vendor, infrastructure.
project.tools and needs.toolsA toolchain and its version, such as rust-1.90, node-22 or dotnet-9.

Coverage thresholds ​

A coverage tool's summary becomes a metric. A script validator writes a result document with the number, and a threshold in verification.thresholds sets a floor on it:

yaml
verification:
  canonical: test
  also: [coverage]
  thresholds:
    - validator: coverage
      read: metrics.line_coverage_pct
      min: 80

A full file is in Examples under the software binding.

Protected paths ​

The software binding adds these to the always-protected set.

ProtectedWhy
**/.gitmodules, **/.gitattributes, **/.mailmapThey change how git reads the repository.
The lint and coverage configurationIt decides what the validators report.

A change that adds a gitlink is a violation. A scope of anywhere leaves out the forge's automation folders, such as .github/**.

Registration ​

This fragment of a tenant config registers the binding and its parts. The versions are illustrative.

yaml
extensions:
  bindings:
    - name: software
      version: "1.0.0"
  adapters:
    - name: software/libtest
      version: "1.0.0"
    - name: software/junit
      version: "1.0.0"
    - name: software/tap
      version: "1.0.0"
    - name: software/sarif
      version: "1.0.0"
  effects:
    - name: open-pr
      version: "1.0.0"

A binding for document review ​

This sketch maps the core onto work that is not software. It defines no adapter format in full.

Core termIn a document-review binding
WorkspaceA versioned folder of documents in a document store.
Version of the workspaceThe store's version id of the folder.
Work itemA review request: which documents to revise and why.
ChangeThe set of documents that differ between two versions of the folder.
ValidatorA script validator that checks style and citations and writes a result document: one finding for each rule and each citation.
CriterionOne requirement of the review request, such as "every claim in section 3 has a source".
Baseline proofThe citation check fails for the criterion on the baseline and passes after the work.
ApprovalA reviewer's sign-off, bound to the digest of the plan or of the change.
Effectpublish: the accepted version of the folder becomes the published one.
Adapterreview/citations: turns a citation checker's own report into a result document.

The workflow is the same shape as for software: an agent plans, a person approves the plan, a loop works through the criteria, a verify step names the validators and an effect step publishes. The project config for such a workspace is in A set of documents.

Next steps ​

The list names the pages to read next.

  • For the result document every adapter writes, see Project config.
  • For the validator contract and the built-in validators, see Validators.
  • For registering a binding and its parts, see Tenant config.

Sponsored by