Skip to content

fix: bootstrap unindexed new projects in v1.1.2 - #20

Merged
Ayleovelle merged 2 commits into
mainfrom
codex/devkit-1.1.2-index-bootstrap
Aug 27, 2026
Merged

Ayleovelle merged 2 commits into
mainfrom
codex/devkit-1.1.2-index-bootstrap

Conversation

@Ayleovelle

@Ayleovelle Ayleovelle commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • treat a newly opened project without an index as normal cold start instead of immediately degrading
  • initialize the first local snapshot through the bounded project_index_register -> project_index_sync sequence, including projects that already contain README, configuration, or source files
  • preserve the host-attested initial entry count and require the synchronized manifest/count to match before indexed recompilation
  • update the plugin, Python package, lockfile, changelog, bilingual README, and bundled Skills to v1.1.2

Write scope

  • Fast Lane bootstrap validation and documentation
  • Relay compiler/service/runtime bootstrap bindings
  • focused bootstrap and release-metadata tests
  • v1.1.2 release metadata and bundled Skill guidance

No generated ZIP artifacts are committed. The separate marketplace snapshot is already present at 1552e153a4c4b255a4be721e949ebce4574fb1ec and records source commit c78749b36691dbee07eec97cbe751ba718db41f2.

Validation

  • uv lock --check
  • touched runtime modules: compileall passed
  • touched Python files: Ruff passed
  • focused release/bootstrap suite: 171 passed, 2 skipped, 279 subtests passed
  • main artifact: 99 members, ZIP CRC clean, manifest 1.1.2
  • marketplace artifact: 121 members, ZIP CRC clean, manifest 1.1.2, snapshot hashes matched member-for-member

Compatibility and safety

This is a patch-compatible behavior fix. Existing wire schema and mode names remain unchanged. Registration failure, synchronization failure, root/manifest/count mismatch, forged or stale attestation, and unavailable host authority remain fail-closed. This PR does not create a tag or trigger the dispatch-only Release workflow.

Summary by Sourcery

Fix new-project bootstrap so the first local index is established and verified before Fast Lane performs indexed work.

Bug Fixes:

  • Bootstrap newly opened projects without an index through a normal bounded register-and-sync cold start, including projects that already contain files.
  • Require the synchronized index manifest and entry count to match the host-attested initial project state before indexed recompilation while retaining fail-closed validation.

Enhancements:

  • Update Fast Lane, Code Atlas, and workflow guidance to distinguish missing initial index context from degraded operation and document the cold-start workflow.

Build:

  • Update plugin and Python package release metadata, lockfile, changelog, and artifact references to v1.1.2.

Documentation:

  • Refresh the English and Chinese READMEs and bundled Skill documentation for v1.1.2 and indexed-project bootstrap behavior.

Tests:

  • Add focused coverage for bootstrapping projects with pre-existing entries and rejecting synchronized entry-count mismatches.

@sourcery-ai

sourcery-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Reviewer's Guide

This patch changes new-project bootstrap from an immediate degraded outcome to a bounded, host-attested register-and-sync cold start. It propagates and verifies the initial manifest and entry count across compiler, service, and runtime boundaries, retains fail-closed behavior for authority or identity failures, adds focused coverage, and updates all v1.1.2 release metadata and guidance.

Sequence diagram for unindexed project cold-start bootstrap

sequenceDiagram
    participant Plugin
    participant Runtime
    participant Registry
    participant Indexer
    Plugin->>Runtime: resolve_new_empty_bootstrap()
    Runtime->>Registry: project_index_register()
    Registry-->>Runtime: workspace_id and attested binding
    Runtime->>Indexer: project_index_sync(workspace_id)
    Indexer-->>Runtime: synchronized manifest and entry count
    alt manifest and count match attestation
        Runtime-->>Plugin: verified index context
        Plugin->>Runtime: indexed recompilation
    else registration, sync, identity, or count mismatch
        Runtime-->>Plugin: fail-closed bootstrap error
    end
Loading

Flow diagram for verified initial index readiness

flowchart TD
    A[New project has no first index] --> B[project_index_register]
    B --> C[project_index_sync]
    C --> D{Manifest and entry count match attestation?}
    D -->|Yes| E[Allow indexed recompilation]
    D -->|No| F[Fail closed]
    B -->|Failure| F
    C -->|Failure| F
Loading

File-Level Changes

Change Details Files
Expand bootstrap attestation to support non-empty unindexed projects while preserving strict validation.
  • Allow a bounded non-negative initial entry count instead of requiring zero.
  • Carry the host-attested count into registry and runtime bindings.
  • Keep invalid state, negative counts, stale attestations, and mismatches fail-closed.
mcp-tools/devkit_fastlane/scripts/team_efficiency.py
mcp-tools/devkit_fastlane/tests/test_team_efficiency.py
mcp-tools/devkit_relay/compiler.py
mcp-tools/mcp-tools/devkit_relay/service.py
mcp-tools/devkit_runtime/relay_runtime.py
Validate the bounded register-and-sync cold-start flow before indexed recompilation.
  • Require synchronized manifest, entry count, snapshot, identity, and attested input values to match the bootstrap binding.
  • Add transport coverage for successful non-empty bootstrap and count mismatch rejection.
mcp-tools/devkit_runtime/relay_runtime.py
mcp-tools/tests/test_project_bootstrap.py
Align Fast Lane and bundled guidance with unindexed-project cold-start behavior.
  • Distinguish missing initial indexes from degraded operation.
  • Document one register followed by one sync, with no status lookup before the first sync.
  • Require bootstrap-only output until trusted synchronized index context is available.
mcp-tools/devkit_fastlane/FASTLANE_CONTRACT.md
mcp-tools/devkit_fastlane/references/efficiency-automation.md
skills/code-atlas/references/status-contract.md
skills/fast-lane-routing/SKILL.md
skills/workflow-design/SKILL.md
Release the patch as v1.1.2 across package metadata and documentation.
  • Update plugin, Python package, lockfile, issue-template, changelog, and bilingual README versions.
  • Refresh documented artifact names and release references.
  • Update metadata assertions covering the new version.
.codex-plugin/plugin.json
.github/ISSUE_TEMPLATE/bug_report.yml
CHANGELOG.md
README.md
README.zh-CN.md
mcp-tools/pyproject.toml
mcp-tools/uv.lock
mcp-tools/tests/test_bugkiller_metadata.py
mcp-tools/tests/test_primary_artifact.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="mcp-tools/devkit_fastlane/scripts/team_efficiency.py" line_range="1158-1159" />
<code_context>
-                attestation["state"] != "new_empty"
-                or attestation["initial_entry_count"] != 0
-            ):
+            if attestation["state"] != "new_empty":
                 return "BOOTSTRAP_PROJECT_NOT_EMPTY", None
             issued = _bootstrap_attestation_timestamp(
                 attestation["issued_at"], "project binding attestation.issued_at"
</code_context>
<issue_to_address>
**issue (broader_impact):** Fast Lane still rejects an attested bootstrap whose initial entry count exceeds `MAX_MANIFEST_UNITS` (16), while the compiler, service, and runtime validators now accept counts up to `2**63 - 1`; a newly opened project containing 17 or more entries therefore fails bootstrap validation instead of completing the promised register-to-sync cold start.

**Triggers:** When a newly opened project has more than 16 initial indexed entries.

**Suggested fix:** Use one shared bootstrap entry-count bound across Fast Lane and the Relay layers, or remove the Fast Lane-specific `MAX_MANIFEST_UNITS` restriction from initial-entry-count validation.
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and if the bootstrap attestation or count handling is wrong, the runtime could persist and use an incorrect initial index, causing later planning to rely on stale or misbound project context. Reverting stops the behavior, and the affected index can be cleared and rebuilt, so the impact is bounded and repairable.

Blocking findings: mcp-tools/devkit_fastlane/scripts/team_efficiency.py:1159


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread mcp-tools/devkit_fastlane/scripts/team_efficiency.py
@Ayleovelle

Copy link
Copy Markdown
Contributor Author

@sourcery-ai review

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. A new project can now create and persist an index snapshot through the register/sync bootstrap, and that snapshot can supply context for later assignments. If the attested manifest, entry count, or identity binding is wrong, reverting the change will not remove the created snapshot; it would need to be cleared or recomputed, but the impact is bounded and repairable.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Ayleovelle
Ayleovelle merged commit ae2f514 into main Aug 27, 2026
7 checks passed
@Ayleovelle
Ayleovelle deleted the codex/devkit-1.1.2-index-bootstrap branch August 27, 2026 09:51
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