Skip to content

🐛 Keep REPL work in its selected project directory - #1121

Merged
taras merged 4 commits into
mainfrom
codex/launch-cwd-1113
Nov 5, 2026
Merged

taras merged 4 commits into
mainfrom
codex/launch-cwd-1113

Conversation

@taras

@taras taras commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Ordinary REPL responses and entries now start in the selected project directory, independently of session storage. Sidekick XMD file operations stay within captured project roots, with explicit session scopes for read-only assets and component authoring. Shell commands, native agents and separately authenticated Git operations retain their existing authority.

<Cwd /> reports the actual contextual directory. <REPL.AssetDir> reads session assets; <REPL.ComponentDir> authors session components. Ordinary component invocation continues in the project, and <REPL.Test> retains session-relative targets and child placement. New approved imports publish beneath session assets/.

When unfinished work from project A is reopened from B, startup asks to switch to A before loading project plugins, profiles or providers. Declining leaves the entry unfinished. Completed history stays passive, and acknowledged effects do not repeat.

Focused evidence covers contextual placement and projection, allowed and refused filesystem operations, asset imports, session component creation/testing, retained mounts, original-directory recovery and executable guide examples. Current signed candidate: d958c88e2708e9a005d4bb565f9d0640c05a1fb9. The bounded CI correction reconciles runtime portability, early refusal handling and retained Files coverage. Its affected Architect/Planner feedback is running. The prior independent Astra PASS covered cc185f11; final-delta independent closure and required CI remain pending. This PR stays draft until the delivery gates complete.

Closes #1113.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

PR #1121: 🐛 Keep REPL work in its selected project directory

68 files, +3443 / -477

Scope

🔴 PR has 3920 lines changed. Split into focused PRs.

🟡 3920 lines changed. PRs under 400 receive more thorough review.

🟡 68 files changed. Are all changes related?

🟡 Changes span 7 directories.

Structural

Oxlint structural signals:

  • no-unused-vars ×25: packages/cli/tests/fixtures/repl/issue-883/sidekick-harness.ts, packages/cli/src/repl/sidekick/admission.ts, packages/cli/src/repl/repositories/deno/provider.ts (+6)
  • no-unnecessary-type-assertion ×6: packages/cli/tests/fixtures/repl/issue-883/sidekick-harness.ts, packages/cli/src/repl/model.ts, packages/cli/tests/fixtures/repl/issue-883/recovery-phase.ts (+1)
  • no-empty-function ×5: packages/cli/src/node-repl-asset-import.ts, packages/cli/src/repl/sidekick/testing.ts, packages/cli/src/repl-profile.ts (+2)
  • no-unnecessary-type-arguments ×3: packages/cli/src/repl/sidekick/owner.ts, packages/cli/src/repl/session.ts

Slop

Oxlint slop signals:

  • no-console ×3: packages/cli/src/cli.ts
  • no-inferrable-types ×2: packages/core/src/expand.ts

Static Analysis

Oxlint: 224 diagnostics across 20 files (26 rules)
Density: 0.065 violations/added-line

no-shadow (55): packages/cli/src/repl/workspace-mount-installation.ts, packages/cli/src/repl/sidekick/admission.ts, packages/cli/src/repl/repositories/deno/provider.ts (+7)
no-useless-default-assignment (37): packages/core/src/expand.ts, packages/cli/src/repl/program.ts
no-unused-vars (25): packages/cli/tests/fixtures/repl/issue-883/sidekick-harness.ts, packages/cli/src/repl/sidekick/admission.ts, packages/cli/src/repl/repositories/deno/provider.ts (+6)
no-floating-promises (25): packages/cli/tests/support/mounted-repl.ts, packages/cli/src/repl/session.ts, packages/cli/tests/fixtures/repl/issue-883/recovery-phase.ts (+2)
unbound-method (21): packages/cli/tests/fixtures/repl/issue-883/sidekick-harness.ts, packages/cli/tests/support/mounted-repl.ts, packages/cli/src/testing-host.ts (+5)
no-unsafe-type-assertion (10): packages/cli/tests/fixtures/repl/issue-883/sidekick-harness.ts, packages/cli/tests/fixtures/repl/issue-883/recovery-phase.ts, packages/core/src/expand.ts (+1)
no-array-sort (8): packages/cli/src/repl-profile.ts, packages/cli/tests/fixtures/repl/issue-883/recovery-phase.ts, packages/cli/src/repl/sidekick/model.ts (+3)
no-unnecessary-type-assertion (6): packages/cli/tests/fixtures/repl/issue-883/sidekick-harness.ts, packages/cli/src/repl/model.ts, packages/cli/tests/fixtures/repl/issue-883/recovery-phase.ts (+1)
no-empty-function (5): packages/cli/src/node-repl-asset-import.ts, packages/cli/src/repl/sidekick/testing.ts, packages/cli/src/repl-profile.ts (+2)
no-base-to-string (5): packages/core/src/expand.ts
consistent-function-scoping (3): packages/cli/tests/support/mounted-repl.ts, packages/cli/src/repl/sidekick/owner.ts
no-console (3): packages/cli/src/cli.ts
no-unnecessary-type-arguments (3): packages/cli/src/repl/sidekick/owner.ts, packages/cli/src/repl/session.ts
consistent-return (3): packages/cli/src/cli.ts, packages/cli/src/repl/program.ts
no-useless-spread (2): packages/cli/tests/support/mounted-repl.ts, packages/cli/src/cli.ts
no-inferrable-types (2): packages/core/src/expand.ts
no-unnecessary-type-conversion (2): packages/cli/src/repl/model.ts, packages/cli/src/repl/sidekick/controls.ts
no-useless-length-check (1): packages/cli/src/repl/sidekick/testing.ts
no-array-reverse (1): packages/cli/tests/fixtures/repl/issue-883/recovery-phase.ts
no-useless-fallback-in-spread (1): packages/core/src/expand.ts
no-underscore-dangle (1): packages/core/src/expand.ts
no-unmodified-loop-condition (1): packages/cli/src/cli.ts
no-unnecessary-template-expression (1): packages/cli/src/repl/model.ts
restrict-template-expressions (1): packages/core/src/expand.ts
no-implied-eval (1): packages/core/src/expand.ts
no-misused-spread (1): packages/cli/src/repl/sidekick/controls.ts

Correctness

  1. Files with signal clusters: repl/entry-placement.ts, repl/sidekick/admission.ts, repl/repositories/deno/provider.ts
    Pattern: Multiple Oxlint rules (no-shadow, no-unused-vars, no-floating-promises) in same files
    Concern: Likely unreviewed generated code or poor code quality
    Question: Are these files undergoing refactoring or are the violations intentional?

  2. Speculative abstraction: repl/entry-placement.ts::admissionPlacement
    Pattern: 1 consumer (used in repl/entry-placement.ts and repl/program.ts)
    Concern: Less than 3 consumers violates Rule of Three
    Question: Is this function truly reusable across multiple contexts?

  3. Dead construct: repl/program.ts::startup variable in prepareReplStartup
    Pattern: Declared but only used in one place
    Concern: Unnecessary declaration
    Question: Could this variable be inlined or removed?

  4. Wrapper indirection: repl/session-directories.ts::scope
    Pattern: Wraps API.Env.around and Permissions.around with no additional logic
    Concern: Redundant abstraction
    Question: Is this wrapper necessary for future extensibility?

  5. Signal cluster: repl/sidekick/owner.ts
    Pattern: Multiple no-unused-vars and no-unsafe-type-assertion violations
    Concern: Potential for unreviewed code
    Question: Are these files part of a generated codebase?

  6. Object literal assertion: repl/program.ts::startup
    Pattern: startup?: Result<ReplStartup> with implicit typing
    Concern: Potential for missing properties
    Question: Is explicit type assertion needed here?

No extraneous code patterns detected.

@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 of cc185f11ab1b4cb55fe9d21b21fb2b4f7b9debf7: PASS, covering all A1–A12 acceptance clauses with no findings.

Reviewer: Codex Astra (gpt-6-astra, medium), replacing a fully joined Fable quota refusal under AGENTS.md. The reviewer inspected the affected filesystem/projection, recovery, component and guide consumers, reused the retained focused evidence, and left source unchanged. No new benchmark is claimed.

CI2444 has demonstrated integration failures. The original Implementor is repairing those separately; this review describes the commit above and does not establish merge readiness.

@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 affected closeout of d958c88e2708e9a005d4bb565f9d0640c05a1fb9: changes required, one blocking finding.

In portable Files routing, an ordinary manual Node/Bun entry with no Sidekick root limits canonicalizes an absolute target’s parent before permission admission. The real <Dir> probe records:

target-parent-realpath → permission:write → permission:absolute → refusal

Required ordering: restore acknowledged results first; admit genuinely live requests before target routing/canonicalization; retain terminal effective-request checks. Add the focused portable/manual regression proving denied absolute requests perform no target canonicalization.

CI2446 is green. The original Implementor is applying this bounded correction; the final exact-head affected review and CI remain required before merge. Other findings stay closed.

@taras
taras marked this pull request as ready for review November 5, 2026 04:47
@taras
taras merged commit 2da83e1 into main Nov 5, 2026
58 checks passed
@taras
taras deleted the codex/launch-cwd-1113 branch November 5, 2026 04:54
@taras

taras commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

#1121 merged at 2da83e148b9718ae78ea90c1019648a08727c320 before its remaining portable permission-ordering correction was pushed. The correction is isolated in #1122 at signed 8aa69addd53a427da8a2e0f36bfcc0f9c13263d2.

The original Architect passed the correction, and the same independent Astra reviewer has confirmed its finding is resolved on the exact follow-up commit. Required CI for #1122 is running. The prior green CI for #1121 remains evidence for the merged revision and is not substituted for the follow-up checks.

taras added a commit that referenced this pull request Nov 5, 2026
Carry the reviewed two-file permission correction forward after #1121 merged.
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.

Use the launch directory for REPL work and contain Sidekick file access

1 participant