Skip to content

Harden double_wide projects with the pinned LibreLane 2, like every other type - #40

Merged
marwaneltoukhy merged 1 commit into
mainfrom
claude/cool-wozniak-9mzn5i
Nov 19, 2026
Merged

marwaneltoukhy merged 1 commit into
mainfrom
claude/cool-wozniak-9mzn5i

Conversation

@marwaneltoukhy

@marwaneltoukhy marwaneltoukhy commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

dw_openframe_user_project hardens with LibreLane 2.4.6 (chipfoundry/openlane-2 CI2511) and connection macros, the same release openframe_user_project uses (chipfoundry/dw_openframe_user_project#3). cf harden still had a separate double_wide path from when the template pinned LibreLane 3. On a clean machine that path fails:

$ cf harden double_wide_openframe_project_wrapper
✗ Failed to load LibreLane 3 step list for this macro
Error: Command '['nix', 'develop', ...]' timed out after 120 seconds

$ cf harden double_wide_openframe_project_wrapper --use-docker
✗ double_wide hardening does not support --use-docker

The step list was queried through nix develop on the project's flake with a 120 s limit, and a first nix develop on a clean machine takes far longer than that.

Changes

  • The double_wide path is removed. A double-wide project goes through the standard path: step list from the cf setup venv, then Nix or Docker with the pinned openlane_version. --use-docker works. _harden_double_wide and the four double_wide_* helpers in librelane_run.py are deleted, with the unused LibreLane 3 pin in utils.py.
  • The standard path honours --dry-run. Only the removed path did. Without this, cf harden <macro> --dry-run on any project type starts a real run.
  • The Nix availability check waits 60 s instead of 5 s. The first call on a machine downloads the flake.
  • cf precheck --dry-run prints its command on one line. This fixes test_precheck_mounts_symlinked_harness, which failed when a line break fell inside the -v mount argument.
  • README and the harden help text no longer mention LibreLane 3.
  • Version 2.7.4.

Behaviour change for double-wide users: cf harden now needs cf setup first (the LibreLane venv and the PDK under dependencies/pdks), as for openframe projects. The project's flake.nix is no longer what cf harden runs.

Verification

Check Result
Unit tests (pytest tests) 197 passed, 1 skipped. Before this change one failed (test_precheck_mounts_symlinked_harness).
cf harden double_wide_openframe_project_wrapper --list-from-steps on the real project, LibreLane 2.4.6 venv returns the step list at once, no Nix build
user_proj_counter hardened with the command this path builds and cf-cli's pinned PDK (3e0e31dc) routing, Magic DRC, KLayout DRC, antenna, slew, LVS, XOR all 0; setup and hold slack positive
double_wide_openframe_project_wrapper, same command and PDK routing, Magic DRC, KLayout DRC, antenna, slew all 0; setup and hold slack positive; boundary XOR against the golden wrapper 0; wrapper LVS (cf-precheck backend) matches

Why the PDK check: cf-cli pins sky130 at 3e0e31dc, while the views merged in the user project were hardened with the PDK the project's flake resolves (0fe599b2). Both give a clean wrapper.

Not verified

  • A real cf harden end to end through Nix or Docker. The container this was written in cannot fetch GitHub flake tarballs and has no Docker daemon, so the Nix and Docker command lines are covered by the dry-run tests only. The LibreLane invocation itself was run by hand with the same arguments.
  • A clean-machine run of cf setup followed by cf harden.

🤖 Generated with Claude Code

https://claude.ai/code/session_012An2D298wKhTxUBnAccUV3

…ther type

dw_openframe_user_project hardens with LibreLane 2.4.6 (chipfoundry/openlane-2
CI2511) and connection macros, the same release openframe_user_project uses.
cf harden still had a separate double_wide path from when the template pinned
LibreLane 3: it ran the project's flake through nix develop, queried the step
list through it with a 120 s timeout (a first nix develop on a clean machine
takes far longer, so the command failed with 'Failed to load LibreLane 3 step
list'), and refused --use-docker.

That path is removed. A double_wide project now goes through the standard
path: step list from the cf setup venv, then Nix or Docker with the pinned
openlane_version.

Also:
- The standard path now honours --dry-run. Only the removed path did; without
  it a dry run would have started a real hardening run.
- The Nix availability check waits 60 s instead of 5 s, since the first call on
  a machine downloads the flake.
- cf precheck --dry-run prints its command on one line, which fixes
  test_precheck_mounts_symlinked_harness where a line break could fall inside
  the mount argument.
- Version 2.7.4.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012An2D298wKhTxUBnAccUV3
@marwaneltoukhy
marwaneltoukhy merged commit a21a52c into main Nov 19, 2026
12 checks passed
@marwaneltoukhy
marwaneltoukhy deleted the claude/cool-wozniak-9mzn5i branch November 19, 2026 12:01
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