{"schema_version":1,"experiment_id":"eoa_inverse_innovation_exp09_archetype_breadth150_20260804","cell_id":"graceful_degradation__computer_science","arm":"BREADTH_PROBE_ONE_SHOT","candidate_id":"graceful_degradation__computer_science__P1","proposal_index":1,"version":0,"title":"Syntax-Safe Degraded Mode for Repository Language Servers","problem":"A repository-aware language server can exhaust its memory or CPU budget when whole-workspace indexing, cross-reference analysis, code-lens generation, and plugin enrichments continue competing with open-document parsing. The process then stalls or restarts, removing even the local syntax feedback and document synchronization needed for basic editing.","actors":["developer using the editor","language-server process","editor client","workspace indexer","optional analysis-plugin owners","engineering team operating the development environment"],"observable_state":"The language server approaches a configured resource boundary while workspace-index queues grow, open-document diagnostic latency rises, garbage-collection or scheduler time increases, and process restarts or client disconnects become imminent. The editor currently exposes no reliable distinction between full semantic service and a reduced operating mode.","consequence":"A resource surge in auxiliary repository analysis can make the entire language service unavailable, interrupting basic editing, discarding warm state, and forcing repeated recovery even though parsing and checking the currently open files could still fit within the available budget.","affected_objective":"Preserve correct document synchronization, parsing, syntax diagnostics, and explicit status reporting for open files during language-server resource stress while maintaining state integrity and a path back to full repository-aware service.","intervention":"Introduce an explicit, reversible degraded mode with a ranked capability policy. When sustained memory, CPU, or queue-pressure thresholds are crossed, stop admitting new whole-workspace indexing work, cancel safely restartable enrichment tasks, disable code lenses and repository-wide reference expansion, and replace deep completion ranking with a bounded local-symbol fallback. Reserve capacity for document synchronization, open-file parsing, syntax diagnostics, cancellation handling, and mode-status reporting. Display the reduced capability set to the developer. Restore suspended capabilities in a specified sequence only after resource pressure remains below a lower recovery threshold, and force a clean reindex if any discarded task lacks a valid continuation checkpoint.","structural_mapping":[{"archetype_element":"Multi-function system under stress","domain_realization":"One language-server process provides open-file checking, workspace indexing, navigation, completion ranking, code lenses, and plugin enrichment under a shared memory and CPU budget."},{"archetype_element":"Explicit core-function prioritization","domain_realization":"Document synchronization, parsing, syntax diagnostics, cancellation, and truthful mode signaling are designated core; repository-wide enrichment and ranking are subordinate."},{"archetype_element":"Detectable degradation trigger","domain_realization":"Sustained resource and queue indicators, evaluated over a window, trigger degraded mode before the process reaches its termination boundary."},{"archetype_element":"Controlled sacrifice of lower-priority capabilities","domain_realization":"Workspace indexing and enrichments are suspended or canceled, while deep completion and navigation are replaced with bounded local-file behavior."},{"archetype_element":"Protected capacity for essential function","domain_realization":"Concurrency slots and memory reservations unavailable to auxiliary jobs remain available to open-document operations and control messages."},{"archetype_element":"Explicit partial-service mode","domain_realization":"The server advertises a machine-readable mode flag and capability set, and the editor presents a visible degraded-service indicator."},{"archetype_element":"Quality floor and integrity invariant","domain_realization":"Diagnostics that are emitted remain syntactically valid and tied to the current document version; uncertain semantic results are withheld rather than presented as complete."},{"archetype_element":"Recovery path","domain_realization":"Hysteretic recovery restores capabilities in stages and performs a clean reindex when checkpoint consistency cannot be established."}],"mechanism_mapping":[{"mechanism_slug":"feature_disablement","role":"Disable code lenses, repository-wide reference expansion, and optional plugin enrichments in a predetermined order to release capacity without disabling the open-file path.","counterfactual_removal":"Without feature disablement, auxiliary capabilities continue consuming the shared budget, so the intervention no longer reallocates enough capacity to preserve the core path."},{"mechanism_slug":"degraded_mode_operation","role":"Expose and enforce a coherent capability profile rather than allowing unrelated requests to fail unpredictably.","counterfactual_removal":"Without a defined degraded operating mode, reductions become silent or inconsistent and clients cannot interpret which results remain supported."},{"mechanism_slug":"fallback_operation","role":"Serve bounded local-symbol completion and navigation when repository-wide semantic indexes are unavailable.","counterfactual_removal":"Without fallback operation, disabling global analysis would turn those user actions into complete failures rather than reduced but useful service."},{"mechanism_slug":"threshold","role":"Use an entry threshold and a lower, sustained recovery threshold to control transition timing and prevent rapid mode oscillation.","counterfactual_removal":"Without threshold-governed transitions, degradation may begin too late, restore too early, or flap repeatedly, undermining both preservation and recovery."}],"causal_chain":["Workspace-scale analysis raises shared resource pressure beyond what full service can sustain.","A sustained threshold detects the approach to the language-server resource boundary.","The priority policy suspends or simplifies lower-priority repository-wide capabilities and makes the mode change visible.","Reserved capacity and reduced contention allow document synchronization and open-file parsing to continue.","The server emits only results consistent with current document versions and the declared reduced capability set.","When pressure remains below the recovery threshold, capabilities return in dependency order or a clean reindex reconstructs discarded derived state.","The developer retains a coherent editing floor instead of losing the entire language service to a stall or restart."],"baseline":"All language-server capabilities share the same worker and memory pools. Under pressure, work is queued or canceled opportunistically, and a supervisor restarts the process after unresponsiveness or resource exhaustion. The client may show disconnected or stale behavior but has no intentional partial-service contract.","nearest_rivals":["Load shedding: reject or cancel excess requests while leaving the advertised capability set unchanged; the proposed intervention also simplifies capabilities and supplies local fallbacks according to an explicit priority hierarchy.","Rate limiting: cap request admission or concurrency; this controls volume but does not specify which service qualities should be sacrificed to preserve open-file correctness.","Failover: move work to another process or host; this depends on alternate capacity, whereas the proposed mode operates with a reduced capability set on the constrained process.","Process restart with state restoration: recover after collapse; the proposed mode attempts bounded partial operation before termination while preserving synchronized open-document state.","Cache eviction: reclaim memory without changing the service contract; the proposed mode intentionally changes the contract, exposes that change, and protects named functions."],"remaining_contrastive_claim":"The defining contrast is not merely lower resource consumption or rejected work: the server deliberately changes its advertised capability set, preserves named open-document invariants with protected capacity, supplies bounded fallbacks for selected features, and includes an explicit restoration sequence.","authority_safety":{"decision_authority":"The language-server runtime may enter the preapproved degraded profile automatically; the language-server maintainers own the capability ranking, thresholds, and recovery policy, while workspace administrators control whether experimental activation is enabled.","authorized_first_step":"Implement the mode controller behind a test-only flag and exercise it against a disposable repository workload with synthetic resource constraints; do not enable automatic production activation.","excluded_actions":["Suppressing or weakening syntax errors for open documents","Emitting semantic results known to be stale while representing them as current","Discarding unsaved document text or authoritative project files","Disabling authentication, access-control, sandbox, audit, or integrity checks","Assigning different degradation quality by user identity or commercial tier during the test","Persisting degraded mode as the default after resource recovery","Activating the experiment in production without review of test evidence"],"halt_rollback":"Abort the trial if document-version consistency fails, unsaved state is lost, the mode indicator disagrees with actual capabilities, core operations exceed the predefined test quality floor, or recovery cannot reconstruct a consistent index. Roll back by disabling the test flag, terminating the disposable server, clearing only its derived test index, and restarting from authoritative workspace files."},"negative_tests":{"strongest_counterevidence":"If auxiliary workspace analysis is not the material source of contention—for example, open-file parsing alone exhausts the budget—sacrificing repository-wide features will not preserve the declared core service.","problem_falsifier":"Controlled stress traces show that language-server stalls or restarts occur with auxiliary indexing and enrichments disabled, or show that open-document operations cannot fit within the minimum reserved resource budget.","intervention_falsifier":"Across repeated test runs at the same bounded stress condition, the degraded profile fails to keep core operations within the predefined quality floor, corrupts document/index state, hides the capability reduction, or cannot return to a consistent full-service state after pressure is removed.","risks":["The capability ranking may protect convenient functions while disabling hidden dependencies required for correct diagnostics.","Users may mistake local-only completion or navigation for repository-complete results.","Entry and recovery thresholds may cause oscillation, late activation, or unnecessarily prolonged degradation.","Canceling analysis tasks may leave derived indexes inconsistent if checkpoint boundaries are incorrect.","Rarely exercised fallback code may rot and fail precisely under stress.","The visible degraded state may become normalized instead of prompting capacity or performance repair.","Plugin behavior may bypass the resource reservation or fail when capabilities disappear.","Resource sacrifices may affect projects unevenly because language and repository structures have different minimum working sets."]},"next_evidence_step":"Run a bounded, non-production replay on one disposable multi-module test repository: execute the same scripted edit, completion, navigation, and diagnostic sequence once under the baseline and once with the flagged degraded controller while imposing a fixed memory limit and synthetic indexing backlog. Record mode transitions, actual advertised capabilities, open-document version consistency, core-operation completion against a preregistered quality floor, process survival, canceled-task cleanup, and successful restoration or clean reindex. Stop after ten paired runs or the first safety halt condition, whichever occurs first.","prior_art_status":"UNSEARCHED","diversity_from_prior_proposals":"No comparison with prior proposals was performed because runtime isolation forbids inspecting other experiment candidates; this candidate is independently anchored in resource contention between open-document correctness and repository-wide language-server enrichment.","revision_record":{"parent_version":null,"progress_targets_addressed":[],"conceptual_changes":[],"operational_changes":[],"evidence_changes":[],"claim_changes":[]}}