Approving an explicitly disabled language package on an empty index fails activation at the positive-control gate #427
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#427
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while independently replaying #425 with the published signed JavaScript 0.1.3 package and the parser-free runtime candidate for #426.
Minimal project: one app.js,
.code-index.tomlcontaining[languages] enabled = ["typescript"], no TypeScript package/file and no metadata files. Initialindexproduces zero indexed files.plugin add de.h-dv.javascript --yes --grant requestedpasses C1, installs and approves the package, but activation fails withgate_failed:the build produced no contributions and carries none. The failed queue contains app.js as done/reresolve, with file_id NULL. The previously active generation is preserved and no JS files are indexed.This is an existing explicit gate contract in
build::gate/first_activation_admits::a_package_that_claims_nothing_in_the_project_still_fails, not evidence that the gate should simply be deleted. A disabled approved language is a legitimate operator state, so distinguish it from a producer expected to extract/admit facts but producing nothing. A project with a healthy carried metadata file follows the separate existing carry path.Required regression: approve a disabled language on a genuinely empty index without silently enabling it, then explicitly enable it and observe extraction. Preserve positive controls for a claimed source whose extraction/projection vanished. No evidence from this fixture of data loss or a permission bypass. #426 fixes the separate preview/warning issues; this activation-policy edge remains open.
Current published 0.41.19 replay identifies two independent boundaries. In a genuinely empty project containing app.js and enabled=[], signed JavaScript approval currently succeeds by deferring the path; a subsequent index then incorrectly indexes app.js even though the language remains disabled. The package fallback route bypasses the effective displacement/ownership decision when no native producer exists. In the original enabled=[typescript] layout, bundled TypeScript adoption can also hit the existing no-projection gate before JavaScript approval; this does not establish that every empty activation should pass.
Candidate fixes the shared fallback condition used by the live PackageSet and dirty-domain owner. The no-projection exception requires positive evidence for every walked path: a loaded pending package claims it, its reserved language is explicitly disabled under auto, no native parser exists, and the index has no files. Unmatched packages, missing contributions and failed admission retain the existing refusal controls. Empty projections no longer claim that rows are indexed and searchable.
Parser-free CLI acceptance with the published signed JavaScript archive now passes approval on an empty index, unchanged disabled configuration (including enabled=[typescript]), a subsequent empty index pass, explicit enablement followed by package-produced symbol extraction, and explicit package-owner override. Removing the live fallback guard fails on silently indexed JavaScript; restoring the old unconditional no-projection gate fails at approval; restored candidate passes. Receipts: /tmp/cosi-020-disabled-{exact-config-proof,restored-proof}, /tmp/cosi-427-mutation-report.json. All 68 targeted routing/dirty-domain/rollback/activation/boundary controls and strict Clippy pass. Full generic-runtime acceptance and required CI remain pending; issue stays open.
Published-binary verification passed in v0.41.20: approving official JavaScript0.1.3 on the empty disabled-language projection remains empty and preserves the language decision; explicit enablement extracts the JavaScript symbol with the expected package producer, and explicit package ownership still works. Source PR465 and release PR466 carry the qualified source/merge and release receipts. Existing fact-loss protection remains: a live change that would discard indexed facts retains the previous active generation with degraded service until explicitly repaired. No gate was removed.