fix: bootstrap unindexed new projects in v1.1.2 - #20
Conversation
Reviewer's GuideThis 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 bootstrapsequenceDiagram
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
Flow diagram for verified initial index readinessflowchart 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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
@sourcery-ai review |
There was a problem hiding this comment.
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.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
project_index_register -> project_index_syncsequence, including projects that already contain README, configuration, or source filesWrite scope
No generated ZIP artifacts are committed. The separate marketplace snapshot is already present at
1552e153a4c4b255a4be721e949ebce4574fb1ecand records source commitc78749b36691dbee07eec97cbe751ba718db41f2.Validation
uv lock --checkcompileallpassed171 passed, 2 skipped, 279 subtests passedCompatibility 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:
Enhancements:
Build:
Documentation:
Tests: