<!--
Copyright (c) 2026 Kataglyphis
SPDX-License-Identifier: MIT
-->

# Hub references in consumer workflows

A consumer repository gets its CI from two places. The submodule `third_party/ANTfrastructure` is pinned to the commit the consumer records. The workflow files name the hub's reusable workflows and composite actions with `uses:`. Those references are not pinned by default.

## What the fleet has decided

The fleet tracks the hub at `develop`, by owner directive. The `sha-pin` convention exempts exactly `Kataglyphis/ANTfrastructure/...@develop`. Every other third-party `uses:` must pin a commit SHA. The rule and its exemption are written in [code-quality-tooling.md](code-quality-tooling.md#six-fleet-workflow-conventions-workflow-lint).

## What the exemption means

Each job then runs two sources at once.

- The scripts a job calls from `third_party/ANTfrastructure` come from the recorded pin.
- The job bodies that a `uses:` names come from the hub's `develop` at run time.

The two can disagree. Then a consumer's CI runs new job logic with old scripts, or the reverse. A hub push also changes a consumer's CI on its next run, with no commit in the consumer. No gate measures this today.

A consumer's `AGENTS.md` may state the other rule: builds are supported only against the recorded submodule gitlinks. Then the directive and that rule conflict for workflow bodies. This page does not pick a winner.

## What the gates cover

| Question | Gate | Answer today |
| --- | --- | --- |
| Is a third-party `uses:` pinned to a SHA? | sha-pin | yes, enforced by the census |
| Does a `uses:` on the hub point at `develop`? | none, exempt | not measured |
| Does the consumer call every hub quality lane? | consumer lanes | yes |
| Do the job bodies match the recorded pin? | none | not measured |

## Decision and options

**Decided 2026-12-03:** the fleet keeps `@develop`. Consumers change nothing, and no drift check is added for now. The options below stay for later.

1. **Keep the directive.** Keep `@develop`. Add a read-only report that lists the hub references per consumer and their drift against the recorded pin. The report is advisory.
2. **Pin to the recorded commit.** Write the recorded SHA into each hub reference. A submodule bump then moves the job bodies too. Renovate can open the bumps, at the cost of one pull request per bump.
3. **Pin reusable workflows only.** Pin the `workflow_call` references. Keep the composite actions at `develop`.

Each option needs a census row per consumer, as the other conventions have. The decision is recorded in [decisions.md](decisions.md).
