Skip to content

feat(registryctl): add editor-ready project initialization#404

Merged
jeremi merged 1 commit into
release/1.0from
codex/1.0-editor-setup
Jul 17, 2026
Merged

feat(registryctl): add editor-ready project initialization#404
jeremi merged 1 commit into
release/1.0from
codex/1.0-editor-setup

Conversation

@jeremi

@jeremi jeremi commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • install deterministic, version-matched project-local JSON Schemas and workspace mappings for VS Code and Zed during registryctl init --from
  • add registryctl authoring editor --project-dir <dir> for existing projects
  • publish a versioned registryctl.init.v1 JSON report through --format json, with concise human output by default
  • preserve custom editor settings through manifest/hash verification, conflict and symlink rejection, transactional publication, rollback, and concurrency controls
  • render every human project/artifact/next-command path safely without control-character or shell-option injection

Closes #394.
Part of #399 and the candidate-neutral first-run work in #198.

This PR is the reviewed replacement for the preserved local codex/registryctl-init-output work. That dirty local checkout was not rebased, staged, reset, or merged.

User and developer impact

New starter projects receive .vscode, .zed, and .registry-stack-editor support automatically. Existing projects can opt in with the standalone command. The five embedded schemas remain matched to the running registryctl binary without a source checkout or network retrieval.

Existing generated editor bundles refresh only after manifest and schema hashes verify. Custom settings, malformed manifests, symlinks, and unexpected file changes remain explicit conflicts rather than being silently overwritten.

Human init output is safe for spaces, quotes, backslashes, C0/C1 controls, newline, carriage return, tab, ESC, and relative leading-dash paths. --format json remains lossless and machine-parseable. Normal paths remain concise and next commands remain shell-usable.

Portable YAML mappings reserve the documented path suffixes at any depth. Exact workspace-root routing remains future editor-extension/LSP work.

Current-base preservation

The consolidated one-commit packet is directly based on c1426fcd295f99800a73287d93561adc49027d9e and preserves integrated #402 typed target attributes, #405 canonical evaluation-format semantics, #383 aggregate diagnostics, #384 source-free credential rejection, and #406's dependency graph.

Validation

  • full Registryctl suite: 103 library, 15 CLI, 94 project-authoring, 8 init-output tests, plus integrations
  • editor transaction and schema integration tests
  • exact hostile-path stdout and real-shell execution tests
  • source-under-test Docker tutorial
  • documentation tests and full current/archive build, including 425,193 link checks
  • locked workspace all-target check and strict workspace Clippy
  • formatting, diff, generated artifact, and Cargo.lock checks
  • independent current-base review and re-review: no findings
  • one DCO-signed commit on exact parent c1426fcd295f99800a73287d93561adc49027d9e

An interactive VS Code/Zed desktop smoke remains candidate evidence because the earlier desktop capture service could not attach. VS Code also requires the recommended Red Hat YAML extension.

Merge only after the full remote matrix is green on exact head 4be3768a7e80ae24bfcf5d631c84cb6b6b9063fe.

jeremi commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

1.0 integration review disposition: keep this PR as the replacement for the preserved local codex/registryctl-init-output work, but do not merge the old-base head as-is.

Required before integration:

  • Rebase onto the then-current release/1.0 after the fix(notary): validate claim response formats #352 replacement lands, resolve the changed-in-both Registryctl authoring/docs surfaces, and preserve feat(notary): close bounded target attribute contracts #402 target-attribute coverage.
  • Route every human-rendered project/artifact path through a control-character-safe renderer. Add stdout-contract coverage for newline, ESC/other controls, spaces, and single quotes.
  • Replace the mutable blob/main source link in the release reference with the repository's versioned release-ref/placeholder convention.
  • Rerun focused Registryctl authoring/init tests, source tutorials, workspace gates, and the full remote matrix, followed by independent current-base review.

The existing remote matrix is green for 1cb5d9d6, but that evidence applies to the stale 6bf7119f base and is not sufficient for integration.

Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
@jeremi
jeremi force-pushed the codex/1.0-editor-setup branch from 1cb5d9d to 4be3768 Compare July 17, 2026 12:44
@jeremi
jeremi marked this pull request as ready for review July 17, 2026 13:10
@jeremi
jeremi merged commit abedb00 into release/1.0 Jul 17, 2026
13 checks passed
@jeremi
jeremi deleted the codex/1.0-editor-setup branch July 17, 2026 13:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4be3768a7e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

pub status: &'static str,
pub project: String,
pub project_kind: InitProjectKind,
pub output: PathBuf,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Serialize init paths without failing on non-UTF8

When init --format json is used on Unix with a non-UTF-8 destination path, this PathBuf field makes serde_json::to_string_pretty fail with path contains invalid UTF-8 characters after the initializer has already copied or written the project. The previous starter report converted paths to display strings, and the Relay initializer also printed display paths, so JSON mode now leaves a successfully-created project behind while exiting nonzero; please convert or reject paths before doing writes so the init command remains atomic.

Useful? React with 👍 / 👎.

Comment on lines +34 to +36
setup_registry_project_editor(&ProjectEditorSetupOptions {
project_directory: options.directory.clone(),
})?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Roll back starter files when editor setup fails

When editor publication fails after the starter has been copied—for example on a project directory hosted on a filesystem that rejects the hard-link based publication used by setup_registry_project_editorinit --from returns an error but leaves the copied starter behind. A retry then hits the earlier “destination must be absent or empty” guard, so the user has to manually clean up a project that was otherwise already copied; either make the editor step non-fatal for init or roll back the copied starter on this post-copy failure path.

Useful? React with 👍 / 👎.

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