Skip to content

docs: fix two accuracy issues caught in Copilot PR reviews - #13

Merged
gonzafg2 merged 1 commit into
mainfrom
docs/copilot-followup-fixes
May 11, 2026
Merged

gonzafg2 merged 1 commit into
mainfrom
docs/copilot-followup-fixes

Conversation

@gonzafg2

Copy link
Copy Markdown
Owner

Summary

Addresses two factual accuracy issues caught by Copilot's automated reviews on PR #6 and PR #12 that were not surfaced before merge (they came in close to the merge timing and were not on the unresolved-thread list at the moment of checking).

Both findings were independently re-verified against the actual workflows / RFC-published HSTS preload requirements before the fixes were drafted. A third Copilot finding from PR #6 (about rust-toolchain.toml pinning wording) was already addressed indirectly by the ADR refactor in PR #12 and is not part of this PR.

What's wrong (and now fixed)

1. CI guard predicates — audit.yml is gated differently

Claim in docs/adr/0011 and matching section of docs/infrastructure.md:

"The three CI workflows (ci.yml, audit.yml, deny.yml) skip their cargo invocations when the workspace has no members. The skip predicate is implemented as a four-line Python script that reads Cargo.toml with the standard-library tomllib module and counts workspace.members."

Reality (verified in current workflows on main):

Workflow Predicate Why
ci.yml Python tomllib + workspace.members count gates cargo fmt/clippy/test/build
deny.yml Python tomllib + workspace.members count gates cargo-deny
audit.yml bash [ -f Cargo.lock ] gates cargo-audit, which scans the lockfile, not the manifest

The two predicates resolve at different times: members > 0 lifts at the first crate addition; Cargo.lock presence lifts at the first build of a binary or application crate. A uniform predicate would have been a misleading abstraction.

Fix: ADR-0011 is retitled and its Context, Decision, Consequences, Alternatives, and Links sections are rewritten to describe both predicates accurately. The "CI guard implementation note" section of docs/infrastructure.md is rewritten to match.

2. ADR-0003 was internally inconsistent about HSTS preload eligibility

Claim in docs/adr/0003 Positive consequences:

"The header is preload-eligible, so when we choose to submit, no configuration change is required."

Contradicted by the same ADR's Alternative 3 section:

"the preload-eligibility floor is one year (we are at six months currently, which is below preload floor anyway)"

Reality: hstspreload.org requires max-age ≥ 31536000 (one year). The project's header serves max-age=15552000 (six months). The header is not preload-eligible. If submitted, the project would have to bump max-age to at least one year first.

Fix: The Positive bullet is rewritten to acknowledge that the preload directive in the header signals intent but does not by itself make the header preload-eligible; submission will additionally require bumping max-age. Alternative 2's wording is corrected: the preload directive is "one of several preload-list eligibility requirements", not "the eligibility gate".

What's not changing

  • The decisions in both ADRs (defer preload submission, use Python tomllib for the workspace-members predicate) are unchanged. Only the wording around their consequences and alternatives is corrected to match operational reality.
  • Neither workflow file is modified. The two-predicate split is the existing reality; the documentation now describes it accurately.
  • MANIFIESTO.es.md (which has a pre-existing authorial edit by the maintainer) is deliberately kept out of this PR via targeted git add.

Verification

  • Single commit signed (SSH Ed25519) with DCO sign-off.
  • grep for preload-eligible/no configuration change is required in docs/adr/0003-hsts-preload-deferred.md returns empty.
  • grep for three CI workflows followed by "single mechanism" claim in ADR-0011 returns empty.
  • No leakage patterns (FIF/FTC/Falabella/gaflemingg) in any modified file.
  • docs/infrastructure.md "CI guard implementation note" matches ADR-0011's two-predicate description.
  • CHANGELOG.md gains a [Unreleased] -> Fixed subsection documenting both corrections.

Risks

  • Low: the corrections expand the documentation rather than removing claims. No reader relying on the previous (wrong) text would now find a contradiction; they would just find a more accurate description.

Copilot's automated reviews on PR #6 and PR #12 raised three points
about the project's documentation. The first (rust-toolchain.toml
pinning wording on PR #6) was already addressed indirectly by the ADR
refactor in PR #12, which split MSRV (in Cargo.toml's `rust-version`)
from contributor toolchain (in `rust-toolchain.toml`'s `channel`) into
clearly separate statements. The other two are corrected here.

1. CI guard predicates were described as a single shared mechanism;
   they are actually two.

   `docs/adr/0011-ci-guards-python-tomllib.md` and the matching
   "CI guard implementation note" section of `docs/infrastructure.md`
   both claimed that all three CI workflows (`ci.yml`, `audit.yml`,
   `deny.yml`) skip their cargo invocations using "a four-line Python
   script that reads `Cargo.toml` with the standard-library `tomllib`
   module and counts `workspace.members`".

   In reality `audit.yml` is gated on `Cargo.lock` presence (a bash
   `[ -f Cargo.lock ]` test), because `cargo-audit` scans the lockfile
   rather than the manifest. `ci.yml` and `deny.yml` use the `tomllib`
   member-count predicate. The two predicates resolve at different
   times (members at the first crate addition; lockfile at the first
   build of a binary or application crate).

   This commit:
     - Retitles ADR-0011 to "Gate CI workflows on workspace state
       with two narrow predicates".
     - Rewrites the ADR's Context and Decision sections to describe
       both predicates accurately.
     - Adds an alternative ("use the same predicate everywhere") with
       its rejection rationale.
     - Updates the Consequences and Links sections accordingly.
     - Rewrites the matching section in `docs/infrastructure.md` to
       match.

2. ADR-0003 was internally inconsistent about HSTS preload eligibility.

   The Positive-consequences section of
   `docs/adr/0003-hsts-preload-deferred.md` claimed that "the header
   is preload-eligible, so when we choose to submit, no configuration
   change is required". This contradicted the same ADR's Alternative 3
   section, which correctly notes that the current `max-age=15552000`
   (six months) is below the one-year (31536000) floor that
   hstspreload.org requires for preload-list eligibility.

   The Positive consequence is rewritten to acknowledge that the
   `preload` directive in the header signals intent but does not by
   itself make the header preload-eligible; submission will
   additionally require bumping `max-age` to at least 31536000. The
   wording of Alternative 2 (which previously said "the directive is
   the eligibility gate") is corrected to "one of several preload-list
   eligibility requirements".

`CHANGELOG.md` records both corrections under a new
`[Unreleased] -> Fixed` subsection.

No factual claim outside these two paragraphs changed; the decisions
themselves stand. The Decision sections of both ADRs are unchanged.

Signed-off-by: Gonzalo Fleming <[email protected]>
Copilot AI review requested due to automatic review settings May 11, 2026 05:54
@gonzafg2
gonzafg2 merged commit df1e3cd into main May 11, 2026
8 checks passed
@gonzafg2
gonzafg2 deleted the docs/copilot-followup-fixes branch May 11, 2026 05:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects documentation inaccuracies in the project’s ADRs and infrastructure docs regarding (1) how CI workflows are gated during the Phase 0 “virtual workspace” period, and (2) what is required for HSTS preload eligibility.

Changes:

  • Update docs/infrastructure.md to document that ci.yml/deny.yml gate on workspace.members (Python tomllib), while audit.yml gates on Cargo.lock presence (bash).
  • Rewrite/retitle ADR-0011 to describe the two-predicate CI gating approach and adjust its alternatives/consequences accordingly.
  • Fix ADR-0003 wording to reflect that the current HSTS header is not preload-eligible without increasing max-age to ≥ 31536000, and record both corrections in CHANGELOG.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
docs/infrastructure.md Replaces the prior “single predicate across all workflows” claim with an accurate per-workflow predicate description.
docs/adr/0011-ci-guards-python-tomllib.md Retitles and rewrites ADR-0011 to reflect the real workspace.members vs Cargo.lock gating split.
docs/adr/0003-hsts-preload-deferred.md Corrects HSTS preload eligibility statements to match the one-year max-age requirement.
CHANGELOG.md Adds an Unreleased “Fixed” section describing the two documentation corrections.
Comments suppressed due to low confidence (1)

docs/adr/0011-ci-guards-python-tomllib.md:6

  • This ADR is marked Accepted but is being edited in place. docs/adr/README.md states that accepted ADR content is not edited after acceptance (except updating Status when superseded/deprecated). To preserve the ADR audit trail, consider writing a new ADR that supersedes ADR-0011 (or introducing an explicit errata mechanism) and only updating ADR-0011's Status accordingly.
# ADR 0011: Gate CI workflows on workspace state with two narrow predicates

- **Status:** Accepted
- **Date:** 2026-05-10
- **Deciders:** Project lead
- **Related:** [ADR-0009](0009-workspace-no-members-during-phase-0.md), `.github/workflows/{ci,audit,deny}.yml`

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to 2
# ADR 0011: Gate CI workflows on workspace state with two narrow predicates

Comment on lines +18 to +25
manifest. The lockfile only appears once a member crate has been
built (and is only relevant for binary or application crates that
commit `Cargo.lock`). This blocks `audit.yml`.

The two conditions resolve on different events: the first lifts as
soon as a member is added to `Cargo.toml`; the second lifts when the
first lockfile-bearing crate exists. Both lifts happen during Phase 1,
but not necessarily simultaneously.
Comment on lines 41 to +47
- Returning visitors get full HSTS enforcement (`max-age` is six
months).
- The header is preload-eligible, so when we choose to submit, no
configuration change is required.
- The `preload` directive is set in the header, signaling intent.
Actual preload-list submission will additionally require bumping
`max-age` to at least 31536000 (one year) per hstspreload.org
requirements; that bump is one configuration change at submission
time, not a re-architecting.
Comment thread CHANGELOG.md
Comment on lines +51 to +59
- `docs/adr/0011-ci-guards-python-tomllib.md` and the corresponding
"CI guard implementation note" in `docs/infrastructure.md`
incorrectly described all three CI workflows as using a single
shared `tomllib`/`workspace.members` predicate. In reality
`audit.yml` is gated on `Cargo.lock` presence (matching what
`cargo-audit` actually needs), while `ci.yml` and `deny.yml` are
gated on the `tomllib` member count. Both documents now describe
the two-predicate split accurately. ADR-0011's title and
alternatives section are updated accordingly.
gonzafg2 added a commit that referenced this pull request May 11, 2026
…16)

Adds ADR-0015 (errata mechanism) and applies the remaining Copilot review findings from PR #13 and PR #14: retroactive errata banners on ADR-0003, ADR-0011, ADR-0013; rename of ADR-0011 to reflect corrected scope; DMARC wording qualifications across infrastructure.md, CHANGELOG, and ADR-0013; Records reference table update.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants