Skip to content

chore(dune-project): restore symlink to .build/dune-project#307

Merged
hyperpolymath merged 1 commit into
mainfrom
restore-dune-project-symlink
May 20, 2026
Merged

chore(dune-project): restore symlink to .build/dune-project#307
hyperpolymath merged 1 commit into
mainfrom
restore-dune-project-symlink

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

The relicense sweep (#304) used sed -i, which atomic-rename-replaces the target file and breaks symlinks. dune-project flipped from mode 120000 (symlink) → 100644 (regular file). Both files have been content-identical since, so nothing was broken — but the symlink was the original repo layout (likely so dune's per-package (version …) + opam regeneration co-located with other build-output staging under .build/).

Restore it: dune-project.build/dune-project. Mode flips back: 100644 → 120000.

Verification

  • dune build --release clean post-restore.
  • Binary --version0.1.1.
  • ls -la dune-project shows lrwxrwxrwx … dune-project -> .build/dune-project.

Tip for future bulk sed

If you ever need to relicense / mass-edit across the repo again, use one of:

  • Operate on git ls-files (lists each symlink once via its declared path; sed on the symlink path will write through to the target — but it'll still atomic-rename and break the link).
  • Edit .build/dune-project directly, leaving the top-level symlink alone.
  • Or find -L … -type f | xargs sed -i --follow-symlinks (if your sed supports --follow-symlinks it writes back through the link rather than replacing it).

🤖 Generated with Claude Code

The relicense sweep (#304) used `sed -i` which atomic-rename-replaces
the target file, breaking the symlink: `dune-project` flipped from
mode 120000 (symlink) to 100644 (regular file).  Both files have been
content-identical since, so nothing's broken — but the symlink was
the original repo layout (presumably so dune's per-package
`(version …)` + opam regeneration lives under `.build/` alongside
other build-output staging).

Restore it: `dune-project` is once again a symlink to
`.build/dune-project`.  Verified post-restore: `dune build --release`
clean, binary `--version` reports `0.1.1`.  Single behavioural change
is that an edit to either path now propagates to the other again, as
originally intended.

If a future bulk sed across the repo encounters this symlink again,
the safe pattern is to operate on `git ls-files` (which lists each
symlink only once via its declared path) — or to edit `.build/dune-project`
directly, which keeps the symlink intact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 42 issues detected

Severity Count
🔴 Critical 13
🟠 High 17
🟡 Medium 12

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Stray AI.a2ml in root -- use 0-AI-MANIFEST.a2ml only",
    "type": "banned",
    "file": "AI.a2ml",
    "action": "delete",
    "rule_module": "root_hygiene",
    "severity": "high"
  },
  {
    "reason": "Superseded by 0-AI-MANIFEST.a2ml",
    "type": "banned",
    "file": "AI.djot",
    "action": "delete",
    "rule_module": "root_hygiene",
    "severity": "high"
  },
  {
    "reason": "Issue in quality.yml",
    "type": "missing_workflow",
    "file": "quality.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Issue in security-policy.yml",
    "type": "missing_workflow",
    "file": "security-policy.yml",
    "action": "create",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "high"
  },
  {
    "reason": "Action actions/checkout@v4 needs attention",
    "type": "unpinned_action",
    "file": "publish-jsr.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action denoland/setup-deno@v2 needs attention",
    "type": "unpinned_action",
    "file": "publish-jsr.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/example/smoke_driver.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/cli.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath hyperpolymath merged commit 08013ba into main May 20, 2026
16 checks passed
@hyperpolymath hyperpolymath deleted the restore-dune-project-symlink branch May 20, 2026 08:34
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