Skip to content

πŸ—‚οΈ Preserve Dir placement through Content - #1114

Merged
taras merged 1 commit into
mainfrom
codex/dir-content-985
Nov 4, 2026
Merged

taras merged 1 commit into
mainfrom
codex/dir-content-985

Conversation

@taras

@taras taras commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Markdown wrappers that place <Content /> inside <Dir> currently lose the selected working directory. Projected commands and relative File reads now use the directory at each projection point, while caller bindings and content-scope ownership remain intact. Leaving the wrapper restores the enclosing directory.

The correction transfers only contextual cwd and the existing private filesystem placement through the structural projection boundary. It adds no public API, dependency or persistence change. The MDX specification describes the corrected behavior.

Validation at signed commit 1d68d211cbdd54b486505ef0c6b3b28bd71268b4:

  • Direct/wrapped commands and File reads, caller binding precedence, sibling projections and completed-stream reuse pass.
  • Failure/cancellation restoration, content-scope lifetime, expansion identity and permission regressions pass.
  • Retained mapped-file reads survive source reassignment without replaying completed effects.
  • All four focused commands pass; original Planner acceptance passes against the exact commit. Independent Astra review passes with no findings; Fable’s actual quota refusal is retained. Required CI remains pending.

First failure logs and tested-candidate correspondence are retained. The separate #1113 launch-cwd/access work is outside this PR.

Closes #985.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

PR #1114: πŸ—‚οΈ Preserve Dir placement through Content

6 files, +337 / -71

Scope

🟑 408 lines changed. PRs under 400 receive more thorough review.

Structural

Oxlint structural signals:

  • no-unused-vars Γ—12: packages/core/src/expand.ts
  • no-unnecessary-type-assertion Γ—1: packages/core/src/expand.ts

Slop

Oxlint slop signals:

  • no-inferrable-types Γ—2: packages/core/src/expand.ts

Static Analysis

Oxlint: 72 diagnostics across 1 file (13 rules)
Density: 0.214 violations/added-line

no-useless-default-assignment (35): packages/core/src/expand.ts
no-unused-vars (12): packages/core/src/expand.ts
no-base-to-string (5): packages/core/src/expand.ts
unbound-method (5): packages/core/src/expand.ts
no-shadow (4): packages/core/src/expand.ts
no-unsafe-type-assertion (3): packages/core/src/expand.ts
no-inferrable-types (2): packages/core/src/expand.ts
no-useless-fallback-in-spread (1): packages/core/src/expand.ts
no-array-sort (1): packages/core/src/expand.ts
no-underscore-dangle (1): packages/core/src/expand.ts
restrict-template-expressions (1): packages/core/src/expand.ts
no-unnecessary-type-assertion (1): packages/core/src/expand.ts
no-implied-eval (1): packages/core/src/expand.ts

Correctness

packages/core/src/expand.ts: no-unused-vars: Dead constructs β€” unused variables in generator functions. QUESTION: Are these variables required for future extension or redundant?
packages/core/src/expand.ts: no-useless-default-assignment: Redundant default assignments β€” values immediately overwritten. QUESTION: Can these be removed to simplify logic?
packages/core/src/expand.ts: signal cluster β€” multiple Oxlint rules (no-unused-vars, no-useless-default-assignment, no-shadow) in same file. QUESTION: Is this generated code or unreviewed changes?
packages/core/src/expand.ts: no-unsafe-type-assertion: Type assertions without validation β€” risks runtime errors. QUESTION: Can type guards replace these assertions?

@taras taras left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Independent review at 1d68d211cbdd54b486505ef0c6b3b28bd71268b4: PASS (Codex Astra, medium).

A1–A5 were checked against the original plan, exact committed diff, affected callers and focused evidence. No substantive correctness, minimalism or consequential performance findings. No source changes or broad test reruns were made.

Fable returned an actual quota refusal; its joined failed attempt is retained. Astra supplies the repository-required replacement verdict, rather than an additional review stage. Original Planner acceptance also passes. Required CI remains a separate merge gate.

@taras
taras marked this pull request as ready for review November 4, 2026 20:59
@taras
taras merged commit 234a596 into main Nov 4, 2026
58 checks passed
@taras
taras deleted the codex/dir-content-985 branch November 4, 2026 21: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.

Preserve <Dir> working directory through <Content />

1 participant