@yeison.restrepo.r/code-conductor 1.52.6 → 1.52.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -502,7 +502,6 @@ The backup and temp rules keep the installer's own backups and crash-stranded te
502
502
  - **`[BUG-074]`, open:** the `/cc-orchestrate` role definitions disagree on when a task's tests are done: `code` may hand back `build_executed` on a red suite, `plan` requires each task to end green, and `qa` passes only on exit 0, so one suite result gates differently depending on the role. Until it is fixed, read a `build_executed` hand-back's reported suite exit code yourself and treat a non-zero one as not done.
503
503
  - **`[BUG-078]`, open:** `scripts/orchestrate.mjs` builds a fix round's write scope with the approved plan included, so Guard 5 lets the fix-round `code` agent write to the plan and only the brief's instruction stops it; any change other than checkbox ticks still halts the run with `ORCH_APPROVED_DOC_CHANGED` on the next `install audit` or fix round, and ticks do not affect `tasks.done`. Until it is fixed, check after a fix round that the approved plan's checkboxes are unchanged.
504
504
  - **`[BUG-079]`, open:** `scripts/orchestrate.mjs` stores every non-security hand-back's full SNAP in `.claude/memory/orchestrator-run.json` with a 64 KiB cap per SNAP but no cap on the total, so a plan of roughly 80 or more tasks with maximally sized hand-backs can push the run file past the hook's 10 MiB read cap, after which `readRunFile` returns null and Guard 6 downgrades from deny to warn for the rest of the run. Until it is fixed, keep orchestrated plans well under 80 tasks, or split a larger item into several runs.
505
- - **`[BUG-087]`, open:** with `--opencode`, the installer writes `.opencode/plugin/conductor-guard.js` through a path that follows symlinks, so a checkout that ships that file as a symlink makes the install overwrite the link's target, which can be outside the project, with the shipped plugin bytes; a timestamped backup is written next to the target. Until it is fixed, check that `.opencode/plugin/conductor-guard.js` is not a symlink (or remove it) before running `code-conductor --opencode` in a checkout you did not author, and restore from the backup if a target was overwritten.
506
505
  - **The `P7` false positive** described under [Guard 3, and what it learned](#guard-3-and-what-it-learned) is still live.
507
506
  - **A re-run against an untouched `project.md` prints a recovery hint it cannot prove is needed.** If you install, never write anything into `.claude/memory/project.md`, and install again, you get a line suggesting the file may have been overwritten by a pre-`1.30.0` re-run. It was not; it equals the stub because it was seeded and never edited. The check compares content and **cannot distinguish "seeded and untouched" from "clobbered"**, which is why the wording is hedged to "may have been" rather than "was". This residual is named and accepted in [`BUG-039`'s spec at `:129`](docs/superpowers/specs/2026-09-27-bug039-installer-host-owned-state-design.md), where the alternative (restoring from the host's own git history) was rejected as writing host files out of the host's history with new failure modes. A **fresh** install is silent, which the Quickstart shows.
508
507
  - **Three open dossiers**, which are the evidence-collection pipeline working rather than a backlog: a session denial tally, one for interleaved-artifact reports, and an intermittent commit-hook hang in the `snap-build` suite. A dossier holds specimens until a mechanism is characterized by probe; an id is minted only when the written condition is met. `[BUG-047]` is what that pipeline produces when it completes: an out-of-scope note, then a dossier, then four specimens across four sessions, then a mint, then a release.
@@ -1,4 +1,4 @@
1
- import { cpSync, mkdirSync, chmodSync, existsSync, lstatSync, readdirSync, readFileSync, statSync, rmSync, unlinkSync } from 'node:fs';
1
+ import { cpSync, mkdirSync, chmodSync, existsSync, lstatSync, readdirSync, readFileSync, readlinkSync, statSync, rmSync, unlinkSync } from 'node:fs';
2
2
  import { join, relative, isAbsolute, sep } from 'node:path';
3
3
  import { createHash } from 'node:crypto';
4
4
  import { mergeFileInto, resolveRealTarget } from './file-merge.mjs';
@@ -242,10 +242,31 @@ const PLUGIN_IN_PLACE = new Set(['created', 'merged', 'unchanged']);
242
242
  // still backs up a copy the host edited before replacing it (BUG-069).
243
243
  const replaceWithTemplate = (templateText, hostText) => ({ text: templateText, changed: hostText !== templateText });
244
244
 
245
+ // The plugin is a managed asset, so a link at its path is removed, never followed:
246
+ // writing through it would overwrite whatever file the checkout points it at (BUG-087).
247
+ // Returns false when the link is still there, so nothing may be written.
248
+ function removePluginSymlink(pluginPath, warn) {
249
+ let st;
250
+ try { st = lstatSync(pluginPath); } catch { return true; }
251
+ if (!st.isSymbolicLink()) return true;
252
+ let linkText = 'an unreadable target';
253
+ try { linkText = readlinkSync(pluginPath); } catch { /* raced away; the unlink still decides */ }
254
+ try {
255
+ unlinkSync(pluginPath);
256
+ } catch (err) {
257
+ warn(`code-conductor: skipping ${OPENCODE_PLUGIN} — it is a symlink and could not be removed (${err.code}); nothing was written`);
258
+ return false;
259
+ }
260
+ warn(`code-conductor: replaced the symlink at ${OPENCODE_PLUGIN} (it pointed to ${linkText}) with the shipped plugin; the file it pointed to was not touched`);
261
+ return true;
262
+ }
263
+
245
264
  function installOpencodePlugin(templateRoot, cwd, { warn, report }) {
246
265
  const parts = OPENCODE_PLUGIN.split('/');
247
266
  mkdirSync(join(cwd, ...parts.slice(0, -1)), { recursive: true });
248
- const status = mergeFileInto(join(templateRoot, ...parts), join(cwd, ...parts), replaceWithTemplate, {
267
+ const pluginPath = join(cwd, ...parts);
268
+ if (!removePluginSymlink(pluginPath, warn)) return;
269
+ const status = mergeFileInto(join(templateRoot, ...parts), pluginPath, replaceWithTemplate, {
249
270
  warn,
250
271
  onBackup: backupReporter(report, { root: cwd, rootLabel: '', file: OPENCODE_PLUGIN, ignoredByDesign: true, action: 'replacing it' }),
251
272
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeison.restrepo.r/code-conductor",
3
- "version": "1.52.6",
3
+ "version": "1.52.7",
4
4
  "description": "A governance layer for Claude Code sessions: hooks that check an agent's commands before they run, a spec-first workflow, and project memory the next session reads.",
5
5
  "keywords": [
6
6
  "agentic-development",