Skip to content

feat: rename venv prompt to project name on container creation (#34) - #42

Merged
c-vigo merged 5 commits into
feature/37-automate-standardize-repository-setupfrom
feature/34-rename-venv-container-creation
Feb 3, 2026
Merged

c-vigo merged 5 commits into
feature/37-automate-standardize-repository-setupfrom
feature/34-rename-venv-container-creation

Conversation

@c-vigo

@c-vigo c-vigo commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

Renames the virtual environment prompt from "template-project" to the project short name when the devcontainer is created. The venv in the image stays at /root/assets/workspace/.venv; the post-create script runs sed to replace "template-project" with {{SHORT_NAME}} in .venv/bin/activate so the shell prompt shows the project name. Also fixes pytest collecting tests from tests/tmp/ (integration workspace dirs), which caused collection errors.

Related Issue(s)

Closes #34
Fixes bug in #36

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Test updates

Changes Made

  • post-create.sh — Add sed -i 's/template-project/{{SHORT_NAME}}/g' /root/assets/workspace/.venv/bin/activate so the venv prompt is updated on first container creation.
  • test_integration.py — Add test_venv_prompt_name in TestDevContainerUserConf: uses devcontainer_up, runs devcontainer exec ... cat /root/assets/workspace/.venv/bin/activate, asserts "template-project" is not in the output.
  • pyproject.toml — Add norecursedirs = "tmp" so pytest does not collect tests from tests/tmp/ (integration test workspace dirs), avoiding ModuleNotFoundError: tests.test_example.
  • CHANGELOG.md — Document commit message standardization ([FEATURE] Standardize and Enforce Commit Message Format #36), venv prompt renaming ([FEATURE] Rename virtual environment upon container creation #34), and pytest tmp exclusion under Unreleased.
  • test_integration.py — Fix existing commit message in test to match new commit message standard (from [FEATURE] Standardize and Enforce Commit Message Format #36).

Testing

  • Tests pass locally (just test)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (README.md, CONTRIBUTE.md, etc.)
  • I have updated the CHANGELOG.md in the [Unreleased] section
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

- Introduced a new test to verify that the .venv/bin/activate script does not contain 'template-project' and is correctly renamed to 'test_project' during container initialization.
- Updated the test placeholders to include the post-create.sh script in the devcontainer configuration.

Refs: #34
- Added a line to replace 'template-project' with '{{SHORT_NAME}}' in the .venv/bin/activate script during container initialization.

Refs: #34
- Added 'norecursedirs' entry to prevent tests from being collected from the 'tmp' directory, which is used for integration-test workspace directories with template tests.

Refs: #34
@c-vigo c-vigo self-assigned this Feb 3, 2026
@c-vigo
c-vigo merged commit a697aa0 into feature/37-automate-standardize-repository-setup Feb 3, 2026
1 check passed
@c-vigo
c-vigo deleted the feature/34-rename-venv-container-creation branch February 3, 2026 12:58
gerchowl added a commit that referenced this pull request Feb 21, 2026
…ompleted (#149)

## Description

Fixes the Reviewer column in `just gh-issues` PR table to distinguish
between requested reviewers (asked but not yet reviewed) and actual
reviewers (submitted a review). Requested reviewers now display as
`?login` with dim italic style; actual reviewers remain plain login with
green/red for approved/changes requested.

## Type of Change

<!-- Mark the relevant option(s) with an 'x' -->

- [ ] `feat` -- New feature
- [x] `fix` -- Bug fix
- [ ] `docs` -- Documentation only
- [ ] `chore` -- Maintenance task (deps, config, etc.)
- [ ] `refactor` -- Code restructuring (no behavior change)
- [ ] `test` -- Adding or updating tests
- [ ] `ci` -- CI/CD pipeline changes
- [ ] `build` -- Build system or dependency changes
- [ ] `revert` -- Reverts a previous commit
- [ ] `style` -- Code style (formatting, whitespace)

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

- `scripts/gh_issues.py`: In `_extract_reviewers`, render REQUESTED
state as `?login` with dim italic instead of yellow
- `tests/test_gh_issues.py`: Update assertions for requested reviewer
format in test_requested_reviewer, test_mixed_reviewers,
test_review_request_with_name_fallback
- `CHANGELOG.md`: Add Fixed entry for #105

## Changelog Entry

<!-- Paste the exact entry you added to CHANGELOG.md under ##
Unreleased.
If no changelog update is needed, write "No changelog needed" and
explain why.
     Example:
     ### Added
- **SSH agent forwarding**
([#42](#42))
- Forward host SSH agent into devcontainer for seamless git
authentication
-->

### Fixed

- **PR table Reviewer column distinguishes requested vs completed
reviewers** ([#105](#105))
- Requested reviewers (no review yet) display as `?login` with dim
italic style
- Actual reviewers (submitted review) display as plain login with
green/red

## Testing

<!-- Describe the tests you ran and how to verify your changes -->
- [x] Tests pass locally (`just test`)
- [ ] Manual testing performed (describe below)

### Manual Testing Details

N/A — unit tests cover the change. Run `uv run pytest
tests/test_gh_issues.py` to verify.

## Checklist

<!-- Mark completed items with an 'x' -->
- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published

## Additional Notes

Design and implementation plan posted on issue #105.

Refs: #105
gerchowl added a commit that referenced this pull request Feb 23, 2026
…e devcontainers (#153) (#155)

## Description

Adds `scripts/devc_remote_uri.py` — a standalone Python module/CLI that
builds the Cursor/VS Code nested authority URI for remote devcontainers.
Part of #70. Opening Cursor/VS Code into a remote devcontainer requires
constructing a `vscode-remote://` URI with hex-encoded JSON specs;
Python handles this cleanly with stdlib only.

## Type of Change

<!-- Mark the relevant option(s) with an 'x' -->

- [x] `feat` -- New feature
- [ ] `fix` -- Bug fix
- [ ] `docs` -- Documentation only
- [ ] `chore` -- Maintenance task (deps, config, etc.)
- [ ] `refactor` -- Code restructuring (no behavior change)
- [ ] `test` -- Adding or updating tests
- [ ] `ci` -- CI/CD pipeline changes
- [ ] `build` -- Build system or dependency changes
- [ ] `revert` -- Reverts a previous commit
- [ ] `style` -- Code style (formatting, whitespace)

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

- **scripts/devc_remote_uri.py** (new): `hex_encode()`, `build_uri()`,
CLI with argparse
- **tests/test_devc_remote_uri.py** (new): 11 pytest unit tests
(hex_encode, build_uri, CLI, edge cases)
- **CHANGELOG.md**: Added entry under ## Unreleased

## Changelog Entry

<!-- Paste the exact entry you added to CHANGELOG.md under ##
Unreleased.
If no changelog update is needed, write "No changelog needed" and
explain why.
     Example:
     ### Added
- **SSH agent forwarding**
([#42](#42))
- Forward host SSH agent into devcontainer for seamless git
authentication
-->

### Added

- **devc_remote_uri.py — Cursor URI construction for remote
devcontainers**
([#153](#153))
- Standalone Python module with `hex_encode()` and `build_uri()` for
vscode-remote URIs
- CLI: `devc_remote_uri.py <workspace_path> <ssh_host>
<container_workspace>` prints URI to stdout
- Stdlib only (json, argparse); called by devc-remote.sh (sibling
sub-issue)

## Testing

<!-- Describe the tests you ran and how to verify your changes -->
- [x] Tests pass locally (`just test`)
- [ ] Manual testing performed (describe below)

### Manual Testing Details

<!-- If applicable, describe manual testing steps -->

N/A — `uv run pytest tests/test_devc_remote_uri.py -v` passes (11
tests). `just lint` passes.

## Checklist

<!-- Mark completed items with an 'x' -->
- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Additional Notes

<!-- Any additional information, screenshots, or context that reviewers
should know -->

Design and implementation plan posted on issue #153. Sub-issue of #70
(remote devcontainer orchestration).

Refs: #153
gerchowl added a commit that referenced this pull request Feb 23, 2026
)

## Description

Fixes the `gh_issues` cross-reference logic so PRs linked via `Refs: #N`
(the project's standard format per CLAUDE.md) are detected. Previously
only `Closes`/`Fixes`/`Resolves` and branch-name matching were
supported. GitHub does not auto-link `Refs:`, so the gh-issues table
showed empty PR columns for such PRs.

## Type of Change

<!-- Mark the relevant option(s) with an 'x' -->

- [ ] `feat` -- New feature
- [x] `fix` -- Bug fix
- [ ] `docs` -- Documentation only
- [ ] `chore` -- Maintenance task (deps, config, etc.)
- [ ] `refactor` -- Code restructuring (no behavior change)
- [ ] `test` -- Adding or updating tests
- [ ] `ci` -- CI/CD pipeline changes
- [ ] `build` -- Build system or dependency changes
- [ ] `revert` -- Reverts a previous commit
- [ ] `style` -- Code style (formatting, whitespace)

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

- `scripts/gh_issues.py`: Added `_REFS_RE` regex and parsing logic in
`_build_cross_refs` to detect `Refs: #102` and comma-separated variants
(`Refs: #102, #103`)
- `tests/test_gh_issues.py`: Added `test_refs_keyword_match` and
`test_refs_comma_separated` unit tests
- `CHANGELOG.md`: Added Fixed entry for #121

## Changelog Entry

<!-- Paste the exact entry you added to CHANGELOG.md under ##
Unreleased.
If no changelog update is needed, write "No changelog needed" and
explain why.
     Example:
     ### Added
- **SSH agent forwarding**
([#42](#42))
- Forward host SSH agent into devcontainer for seamless git
authentication
-->

### Fixed

- **gh-issues cross-ref detects Refs: #N in PR bodies**
([#121](#121))
- `_build_cross_refs` now parses `Refs: #102` and comma-separated
variants (`Refs: #102, #103`) alongside Closes/Fixes/Resolves

## Testing

<!-- Describe the tests you ran and how to verify your changes -->
- [x] Tests pass locally (`just test`)
- [ ] Manual testing performed (describe below)

### Manual Testing Details

N/A — unit tests cover the new behavior. Run `just gh-issues` after
merge to verify PR↔issue links appear for PRs with `Refs:` in body.

## Checklist

<!-- Mark completed items with an 'x' -->
- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Additional Notes

N/A

Refs: #121
gerchowl added a commit that referenced this pull request Feb 24, 2026
## Description

Makes issue numbers in the PR table "Issues" column clickable terminal
hyperlinks. Previously they were styled with cyan but not clickable. The
fix replaces `_styled` with `_gh_link` for consistency with how PR
numbers and issue numbers elsewhere in the dashboard are rendered.

## Type of Change

<!-- Mark the relevant option(s) with an 'x' -->

- [ ] `feat` -- New feature
- [x] `fix` -- Bug fix
- [ ] `docs` -- Documentation only
- [ ] `chore` -- Maintenance task (deps, config, etc.)
- [ ] `refactor` -- Code restructuring (no behavior change)
- [ ] `test` -- Adding or updating tests
- [ ] `ci` -- CI/CD pipeline changes
- [ ] `build` -- Build system or dependency changes
- [ ] `revert` -- Reverts a previous commit
- [ ] `style` -- Code style (formatting, whitespace)

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

- `scripts/gh_issues.py` — Add `_format_pr_issues_cell` helper, use
`_gh_link` instead of `_styled` for issues cell in `_build_pr_table`
- `tests/test_gh_issues.py` — Add `TestFormatPrIssuesCell` tests for
clickable link markup

## Changelog Entry

<!-- Paste the exact entry you added to CHANGELOG.md under ##
Unreleased.
If no changelog update is needed, write "No changelog needed" and
explain why.
     Example:
     ### Added
- **SSH agent forwarding**
([#42](#42))
- Forward host SSH agent into devcontainer for seamless git
authentication
-->

### Fixed

- **Issue numbers in PR table Issues column are not clickable links**
([#174](#174))
- Replace `_styled` with `_gh_link` in `_build_pr_table` so issue
numbers render as clickable terminal hyperlinks

## Testing

<!-- Describe the tests you ran and how to verify your changes -->
- [x] Tests pass locally (`just test`)
- [ ] Manual testing performed (describe below)

### Manual Testing Details

N/A — Run `just gh-issues` and visually verify issue numbers in the PR
table Issues column are clickable.

## Checklist

<!-- Mark completed items with an 'x' -->
- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Additional Notes

N/A

Refs: #174
c-vigo added a commit that referenced this pull request Aug 20, 2026
…1555)

## Description

Security exception expiries surfaced only as a **hard failure on the day
after**. `check-expirations` runs in all PR CI (`ci.yml:441`, `:524`),
in
pre-commit, as the first step of both nightly `security-scan.yml` lanes
and in
the release train (`release.yml:906`) — so one lapsed block reds every
open
branch, both scan lanes and the release path at once, with zero prior
warning.
That happened three times in two months (#1260, #1481, #1547), each time
on a
date a human had chosen deliberately weeks earlier. The information
existed;
nothing surfaced it.

This adds a **seven-day advance notice**. It is a notice, not a gate:
the hard
gate is untouched.

## Type of Change

- [x] `feat` -- New feature
- [x] `ci` -- CI/CD pipeline changes
- [x] `docs` -- Documentation only
- [x] `test` -- Adding or updating tests

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

**1. `check-expirations --warn-days N` and `--json`**
(`packages/vig-utils/src/vig_utils/check_expirations.py`)

- `--warn-days N` emits `::warning::` annotations (stderr, like the
existing
`::error::` ones) for entries falling due within N days, **inclusive**.
It never changes an exit code: an entry inside the window is still
valid, and
  an already-expired entry still exits 1 exactly as today.
- `--json` prints `{"expired": [...], "expiring": [...]}` on stdout,
each record
`{"id", "file", "expiration", "days_left"}` (`days_left` is negative for
an
expired entry). It replaces the human summary line so stdout is pure
JSON,
and it is still emitted on the failing (expired) run, where a caller
needs it
  most.
- The two flags compose. A new `classify_entries()` holds the single
classification rule; `check_file()` is re-expressed through it and keeps
its
exact contract, so the module stays the single parser of the
`Expiration:`
  grammar.
- **Default behaviour is byte-identical** — no existing call site moves.

**2. A third issue class in `.github/workflows/security-scan.yml`** (not
a new
workflow — that job already carries the `main`/`dev` matrix, `issues:
write`,
the label bootstrap and the ref-distinct dedup pattern from #1548)

- Placed **before** the blocking `Validate .vulnixignore exception
expirations`
step, so an already-red register still reports what is coming next. A
notice
  scheduled after it would go silent exactly on the runs that need it.
- Covers all three registers — `.vulnixignore`, `.trivyignore` **and**
`.github/dependency-review-allow.txt`. The nightly gate reads only the
first,
but the other two red every branch just as hard (#1260 was a
`.trivyignore`
  case).
- Opens **one deduplicated issue per (matrix ref x distinct upcoming
expiry
date)**: `Security exception register (dev): exceptions expire
2026-09-02`.
Per-date because a date maps 1:1 to one combined review pass and
staggered
dates then get their own issues — reinforcing the "stagger across weeks"
rule
  rather than flattening it. Dedup reuses the existing
`gh issue list --state open --label security-scan --search "\"$TITLE\"
in:title"`
lookup, with an exact-title filter on top because GitHub's search
tokenises a
  date and would otherwise let one date's open issue suppress another's.
- `continue-on-error: true` and every `gh` failure degrades to a
`::warning::`
— the step can never turn a green nightly scan red. The hard gate stays
the
  validation step.
- The body lists only that date's entries, then states the
anti-blind-extension
standard (read the latest findings delta first, **delete** what the pin
advance cleared, a renewal is a re-verification not a date bump) and
links
  `docs/CONTAINER_SECURITY.md`.

**3. Docs** — new *Advance notice, one grid period ahead* subsection in
`docs/CONTAINER_SECURITY.md`, inside the exception-register section and
right
after the Wednesday-grid rationale it depends on. It states explicitly
that this
is a notice and the gate is unchanged, and repeats the
anti-blind-extension rule
(the notice deliberately arrives *before* the week's findings delta
exists).
`SECURITY.md:88` ("Expired entries fail CI via the `check-expirations`
utility")
is still exactly true, so it is left alone.

### Why 7 days

One expiry-grid period. `docs/CONTAINER_SECURITY.md` puts every
`Expiration:` on
a Wednesday so an entry turns red on the Thursday *after* the week's
Renovate
`nixpkgs` bump and the first nightly findings delta. A 7-day lead lands
the
notice on a Wednesday too, one full Renovate cycle ahead: notice Wed,
bump
merges Mon/Tue, nightly delta Tue/Wed, act Wed, red Thu.

## Changelog Entry

```markdown
### Added

- **A security exception now gives seven days' notice before it fails
  everything** ([#1552](#1552))
  - `check-expirations` runs in all PR CI, in pre-commit, in both nightly scan
    lanes and in the release train, so one lapsed block reds every open branch
    at once — three times in two months
    ([#1260](#1260),
    [#1481](#1481),
    [#1547](#1547)) — with no prior
    signal, even though every date had been chosen deliberately weeks earlier
  - `check-expirations` gains `--warn-days N` (emit `::warning::` annotations
    for entries falling due within N days, exit code untouched) and `--json`
    (emit the `expired`/`expiring` classification on stdout). The flags compose,
    and they keep the utility the single parser of the `Expiration:` grammar —
    no caller re-implements it
  - The nightly `security-scan` gains a third, non-failing issue class: one
    deduplicated notice per scanned ref per distinct upcoming expiry date,
    titled `Security exception register (<ref>): exceptions expire <date>`,
    covering `.vulnixignore`, `.trivyignore` **and**
    `.github/dependency-review-allow.txt`
  - The step runs *before* the blocking validation step, so an already-red
    register still reports what is coming next, and it is `continue-on-error`
    so a missed notice can never turn a green scan red
  - Seven days is one expiry-grid period: dates land on a Wednesday, so the
    notice does too, one full Renovate cycle ahead of the red. The issue body
    spells out that a renewal is a re-verification, not a date bump — read the
    findings delta, delete what the pin advance cleared — because the notice
    deliberately arrives before that data exists
  - Default behaviour is unchanged: no existing call site, exit code or output
    moves
```

## Testing

- [x] Tests pass locally (`just test`)
- [x] Manual testing performed (describe below)

### TDD evidence

Six commits, each phase its own commit:

| Commit | Phase |
|--------|-------|
| `050fe043` `test(vigutils): pin --warn-days and --json on
check-expirations` | RED |
| `3170a59a` `feat(vigutils): add --warn-days and --json to
check-expirations` | GREEN |
| `4ae883a6` `test(workflows): pin the seven-day exception expiry notice
on security-scan` | RED |
| `bb35a932` `ci(security-scan): open an advance notice 7 days before an
exception expires` | GREEN |
| `727c19ab` `docs(security): document the seven-day exception expiry
notice` | docs |
| `9b1a831c` `docs(changelog): record the security exception expiry
advance notice` | changelog |

**RED, utility** — `ImportError: cannot import name 'classify_entries'`,
1 collection error.
**GREEN, utility** — `25 passed` in
`packages/vig-utils/tests/test_check_expirations.py`.

**RED, workflow** — `7 failed` in the new
`tests/test_workflow_expiry_notice.py`
(`AssertionError: no matching step found in security-scan.yml`), while
the three
existing #1548 tests passed.
**GREEN, workflow** — `10 passed` across both workflow-shape files.

`tests/test_workflow_scan_failure_reporting.py::_reporting_step` matched
the
first step containing `gh issue create`, which the new step would have
shadowed
— it now also requires a `failure()` guard, which the notice step
deliberately
does not carry. Caught by running the full suite, not by the hook suite.

### Verification output

**Full test suite** — `1645 passed, 20 skipped, 2 warnings in 282.61s`.

**Default behaviour unchanged** (the contract every existing call site
relies on):

```console
$ uv run check-expirations .trivyignore .vulnixignore
Validated 32 exception(s) across 2 file(s)   # exit 0
```

A test pins stdout to exactly `Validated 2 exception(s) across 1
file(s)\n` with
empty stderr on a default run.

**Real registers, real today (2026-08-20), 7-day window** — nothing due,
as
expected: 29 of 33 entries sit on `2026-09-02`, 13 days out.

```console
$ check-expirations --warn-days 7 --json .trivyignore .vulnixignore .github/dependency-review-allow.txt
{"expired": [], "expiring": []}              # exit 0
```

**Same registers with `today` injected to 2026-08-26** (7 days before
that
cliff) — 29 entries reported across all three registers, exit 0:

```
::warning::Security exceptions expiring within 7 day(s) — review before they fail CI:
::warning::  - .vulnixignore: CVE-2025-15281 (expires 2026-09-02, 7 day(s) left)
...
::warning::  - .trivyignore: jwt-token (expires 2026-09-02, 7 day(s) left)
::warning::  - .github/dependency-review-allow.txt: GHSA-wvrr-2x4r-394v (expires 2026-09-02, 7 day(s) left)
```

**Workflow step executed locally**, extracted from the YAML and run
against the
real registers with stubbed `uv`/`gh` (injected `today = 2026-08-26`):

| Scenario | Result |
|----------|--------|
| 29 entries due on one date | one `gh issue create`, title `Security
exception register (dev): exceptions expire 2026-09-02`, body listing
exactly that date's entries |
| exact title already open (#42) | `Open notice already exists for
2026-09-02: #42 -- skipping create`, exit 0 |
| only a *different* date open (#9, 2026-10-07) | issue still created —
the exact-title filter earning its keep |
| `WARN_DAYS=1`, nothing due | `No security exceptions expire within 1
days on dev`, exit 0 |
| register missing / unparseable payload | `::warning::could not
classify the exception registers; the validation step below reports the
real failure`, **exit 0** |

**Linting** — `just precommit` (`prek run --all-files`) fully green, 52
hooks
`Passed`, zero failures, clean tree afterwards. `actionlint` green on
`security-scan.yml` specifically. `zizmor` in CI audits only
`assets/workspace/.github/workflows/`, which this PR does not touch;
every
`${{ }}` in the new step is passed through step `env` rather than
interpolated
into the script.

## Checklist

- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have updated the documentation accordingly
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published

## Additional Notes

- **Parallel work on #1553.** That issue staggers the `Expiration:`
dates in the
exception registers and touches only those dates. This PR changes no
date in
any register. The only expected overlap is a `CHANGELOG.md` conflict in
the
  `## Unreleased` section, which union-merges.
- **Out of scope, per the issue:** the scaffold under
`assets/workspace/`.
Consumers get the `check-expirations` pre-commit hook but ship no
registers
and no `security-scan.yml`, so there is nothing to warn about;
`--warn-days`
  reaches them through the pinned utility if they ever add one.
- **Deliberately skipped:** `--warn-days` in PR CI (a yellow annotation
on every
PR). The issue lists it as "worth adding alongside" but not required,
and a PR
annotation reaches whoever opens that run rather than the register's
owner.
Left out to keep this diff minimal — worth a follow-up issue if wanted.
- The `assets/workspace/.devcontainer/CHANGELOG.md` diff is the
`sync-manifest`
  mirror of the root changelog, regenerated by the hook.

Refs: #1552
gerchowl added a commit that referenced this pull request Oct 27, 2026
## Description

Add ADR §3 runner diagnostics: actionable legacy migration warnings,
whitespace warnings, effective-map configuration notices, and a
class/source step-summary table. Diagnostics never print runner label
values.

## Type of Change

<!-- Mark the relevant option(s) with an 'x' -->

- [x] `feat` -- New feature
- [ ] `fix` -- Bug fix
- [ ] `docs` -- Documentation only
- [ ] `chore` -- Maintenance task (deps, config, etc.)
- [ ] `refactor` -- Code restructuring (no behavior change)
- [x] `test` -- Adding or updating tests
- [ ] `ci` -- CI/CD pipeline changes
- [ ] `build` -- Build system or dependency changes
- [ ] `revert` -- Reverts a previous commit
- [ ] `style` -- Code style (formatting, whitespace)

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

- Derive required classes from the built-in effective lane map, ready
for #1927 to supply its override.
- Report missing opted-in variables, partial setup, and private
repositories without visible variables.
- Execute the action Bash in tests, injecting the future effective map
without implementing its parser.

## Changelog Entry

### Added
- **Actionable CI runner diagnostics**
([#1926](#1926))
- Warn about legacy runner settings, whitespace-only variables and
missing opted-in classes; report private-repository configuration gaps
and class sources without printing labels


## Testing

`uv run --with pytest-xdist pytest tests/test_ci_runner.py -n 4
--basetemp=$HOME/.cache/devkit-pytest/1926`: 213 passed, exit 0.

Pre-change diagnostic run: 25 failed, 7 passed, exit 1; committed tests
before implementation. Repository hooks run inside `nix develop`.
- [ ] Tests pass locally (`just test`)
- [ ] Manual testing performed (describe below)

### Manual Testing Details

Reviewed diagnostics against the accepted ADR §3. Lane override parsing
remains scoped to #1927.

## Checklist

<!-- Mark completed items with an 'x' -->
- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published

## Additional Notes

S1 (#1925) is merged. No lane override parser is included.
Required-class diagnostics consume the effective map; tests inject that
map for opted-in class cases.

Refs: #1926

<!--
Please include GitHub issue references in the "Refs:" line above (e.g.,
`Refs: #42`).
Every change must be traceable to an issue, per project rules.
If not related to a specific issue, explain why (chore/documentation
only).
See [commit-messages.mdc](../../rules/commit-messages.mdc) for more
details.
-->
gerchowl added a commit that referenced this pull request Nov 3, 2026
## Description

Carry #1856 / PR #1988 into the 1.18.2 hotfix. A target installer now
advances release pins that matched the consumer's previous version,
recognizes qualified and v-prefixed refs, and reports retained-pin
mismatches with advice that respects opt-out.

Targets `release/1.18.2`; no merge or release dispatch is requested.

## Type of Change

<!-- Mark the relevant option(s) with an 'x' -->

- [ ] `feat` -- New feature
- [x] `fix` -- Bug fix
- [ ] `docs` -- Documentation only
- [ ] `chore` -- Maintenance task (deps, config, etc.)
- [ ] `refactor` -- Code restructuring (no behavior change)
- [x] `test` -- Adding or updating tests
- [ ] `ci` -- CI/CD pipeline changes
- [ ] `build` -- Build system or dependency changes
- [ ] `revert` -- Reverts a previous commit
- [ ] `style` -- Code style (formatting, whitespace)

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

- Cherry-picked all four PR #1988 commits in order with provenance
retained before the final Refs line.
- Adapted the missing dev-only test harness to the 1.18.1 container
installer boundary: a minimal test-only runtime stand-in executes the
real scaffold. All 18 policy cases and assertions remain AST-identical
to dev.
- The hotfix used `seed`; Fixed, Changed and migration entries are under
`[1.18.2] - TBD`. The sync-manifest hook regenerates the workspace
mirror.

## Changelog Entry

### Changed

- **Default lockstep pin advancement**
([#1856](#1856)): lockstep
release pins advance unless `DEVKIT_FLAKE_PIN_ADVANCE=false`.

### Fixed

- **Advance lockstep release pins during upgrades**
([#1856](#1856))
- The target installer advances release pins matching the pre-upgrade
version by default, keeping the scaffold and dev shell aligned even
through older upgrade workflows.
- Recognize qualified release refs, preserve `refs/tags/`, and report
removal of a leading `v` to use published bare tags.
- Preserve explicit pin-advance settings; report every retained-pin
mismatch, including failed updates and missing Nix, with
manual-alignment advice that honors an explicit opt-out.
- Migration: affected direnv/both consumers can set
`DEVKIT_FLAKE_PIN_ADVANCE=false` to opt out and align pins manually; see
[the migration
note](docs/MIGRATION.md#lockstep-flake-pins-during-upgrades).

## Testing

Commands ran inside `nix develop`:
- `uv run --with pytest-xdist pytest tests/test_install_direnv_host.py
tests/test_flake_pin_lockstep.py -n 2
--basetemp=$HOME/.cache/devkit-pytest/1856-carry-final`: 35 passed, exit
0.
- `uv run --with pytest-xdist pytest
tests/test_utils.py::TestInstallScriptUnit -n 2
--basetemp=$HOME/.cache/devkit-pytest/1856-carry-unit`: 3 passed, exit
0.
- `bats tests/bats/install.bats`: 107 passed, exit 0.
- RED evidence: initial policy tests had 4 failures / 1 pass, exit 1;
round-two tests against the initial implementation had 10 failures / 8
passes, exit 1.
- Commit hooks passed; `git diff --check` passed. Full suites are
delegated to PR CI.
- [ ] Tests pass locally (`just test`)
- [ ] Manual testing performed (describe below)

### Manual Testing Details

Compared every carried file with `origin/dev` using `git diff`:
- `install.sh`: the entire post-initialization section, including
policy, normalization, rollback and warnings, is byte-identical. Earlier
differences retain 1.18.1 container scaffolding, version resolution,
preflight and environment forwarding rather than importing #1871/#1826
and runner migrations.
- `assets/init-workspace.sh`: the pin-knob preservation change matches
dev; remaining differences are existing Rust config seeding / pack
support, untracked-file preflight, gitignore rendering, runner lane
validation/migration and extension-hook reconciliation.
- `assets/workspace/.github/workflows/ci.yml`: lockstep normalization
matches dev; existing runner selection, checkout paths and
container-based drift checks stay on the release baseline.
- `assets/workspace/.vig-os`: pin-policy documentation matches dev;
existing runner documentation and absence of lane-size settings remain
from the release baseline.
- `docs/DOWNSTREAM_RELEASE.md` and its workspace mirror: upgrade-policy
prose matches dev; only the existing runner-json contract differs.
- `docs/MIGRATION.md`: the #1856 migration section is byte-identical;
remaining differences retain release-baseline runner contracts/migration
guidance, manifest and language descriptions, shell/env guidance,
preflight behavior, and absence of the dev-only site-leak hook.
- `tests/test_flake_pin_lockstep.py`: byte-identical to dev.
- `tests/bats/install.bats`: carried assertions match dev; existing
preflight tests remain, fixture modes use direnv through the hotfix
container path rather than dev's both mode, and dry-run targets retain
the baseline behavior.
- `tests/test_install_direnv_host.py`: all policy decorators, function
code and assertions match dev as an AST. Only minimal harness helpers
are carried; unrelated dev host-scaffolding and migration tests are
absent. The runtime stand-in replaces dev's Nix metadata/develop replay
and records unexpected calls.
- Root and mirrored changelogs retain hotfix/released history instead of
unrelated dev Unreleased entries; #1856 entries are relocated to 1.18.2.
The mirror uses the repository's manifest transforms.

## Checklist

<!-- Mark completed items with an 'x' -->
- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in `[1.18.2] - TBD` per the hotfix
brief (entry above)
- [x] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published

## Additional Notes

The brief explicitly overrides the generic dev-base and Unreleased
instructions for this hotfix carry.

Refs: #1856

<!--
Please include GitHub issue references in the "Refs:" line above (e.g.,
`Refs: #42`).
Every change must be traceable to an issue, per project rules.
If not related to a specific issue, explain why (chore/documentation
only).
See [commit-messages.mdc](../../rules/commit-messages.mdc) for more
details.
-->
gerchowl added a commit that referenced this pull request Nov 4, 2026
## Description

Make `install.sh --dry-run` fast and deterministic offline. A
timestamped trace reproduced a 12.857 s dry run, including 12.814 s in
`podman info`, exceeding the existing 10 s test timeout.

## Type of Change

<!-- Mark the relevant option(s) with an 'x' -->

- [ ] `feat` -- New feature
- [x] `fix` -- Bug fix
- [ ] `docs` -- Documentation only
- [ ] `chore` -- Maintenance task (deps, config, etc.)
- [ ] `refactor` -- Code restructuring (no behavior change)
- [x] `test` -- Adding or updating tests
- [ ] `ci` -- CI/CD pipeline changes
- [ ] `build` -- Build system or dependency changes
- [ ] `revert` -- Reverts a previous commit
- [ ] `style` -- Code style (formatting, whitespace)

### Modifiers

- [ ] Breaking change (`!`) -- This change breaks backward compatibility

## Changes Made

- Discover dry-run runtimes through PATH without daemon probes; explicit
flags still win.
- Defer GitHub default-branch lookup and remote latest release
resolution; retain local checks and pins.
- Explain deferred checks in help and output. Add PATH-shim regression
coverage for all four modes, rejecting network tools and runtime
invocation.
- Show unresolved direnv releases as `<latest-release>` placeholders;
explain PATH-only runtime selection and possible fallback on a real run.
- Document `--preview` for resolved releases and runtime health, and
keep direnv output free of runtime-health disclosures. Pin the container
deferred-checks disclosure in regression tests.
- Keep the 10 s timeout unchanged. Exercise remote release resolution
through preview, preserving success and failure coverage.

## Changelog Entry

- **Offline, probe-free installer dry runs**
([#2021](#2021))
- Defer remote branch checks, latest release resolution and runtime
health probes until execution.
- Keep local version pins and explicit runtime choices in the plan;
discover runtimes through PATH only.
- Label unresolved releases as placeholders and explain runtime fallback
and preview verification.

## Testing

- Round 2: mutant M5 (remove container deferred disclosure) rejected: 3
container cases failed, direnv passed (pytest exit 1); restored source.
- Round 2: new plan/disclosure assertions failed in all four modes
before implementation (exit 1).
- Round 2: utility and direnv installer pytest tests: 69 passed (exit
0); installer Bats: 114 passed (exit 0); `nix develop --command just
docs` exited 0.

- RED: four new regression cases failed (exit 1), recording `gh api`,
`git ls-remote`, `docker info`, and `podman info`.
- GREEN: `uv run --with pytest-xdist pytest tests/test_utils.py -n 4`
with isolated external basetemp: 37 passed (exit 0).
- `nix develop --command uv run --with pytest-xdist pytest
tests/test_install_direnv_host.py tests/test_utils.py -n 4` with
isolated external basetemp: 69 passed (exit 0).
- `nix develop --command bats tests/bats/install.bats`: 114 passed (exit
0).
- Timestamped `bash -x`: before default 12.857 s / direnv 0.456 s; after
default 0.045 s / direnv 0.046 s.
- `unshare -rn`: before exit 1 (runtime probe); after default and direnv
exit 0, 0.043 s each.
- [ ] Tests pass locally (`just test`)
- [x] Manual testing performed (describe below)

### Manual Testing Details

Ran the installer against an empty temporary target with timestamped
shell tracing, then repeated with networking disabled using `unshare
-rn`. No files were created.

## Checklist

<!-- Mark completed items with an 'x' -->
- [x] My code follows the project's style guidelines
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation accordingly (edit
`docs/templates/`, then run `just docs`)
- [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and
pasted the entry above)
- [ ] My changes generate no new warnings or errors
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Additional Notes

<!-- Any additional information, screenshots, or context that reviewers
should know -->

Refs: #2021

<!--
Please include GitHub issue references in the "Refs:" line above (e.g.,
`Refs: #42`).
Every change must be traceable to an issue, per project rules.
If not related to a specific issue, explain why (chore/documentation
only).
See [commit-messages.mdc](../../rules/commit-messages.mdc) for more
details.
-->
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.

1 participant