Skip to content

Refactor Component-Service Layer#732

Merged
lbedner merged 1 commit into
mainfrom
refactor-component-service-layer
Jun 10, 2026
Merged

Refactor Component-Service Layer#732
lbedner merged 1 commit into
mainfrom
refactor-component-service-layer

Conversation

@lbedner

@lbedner lbedner commented Jun 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 10, 2026 01:17

Copilot AI 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.

Pull request overview

This PR refactors how Aegis Stack tracks component/service file ownership and feature detection by making the spec registry (and each spec’s FileManifest) the single source of truth. It also adds a suite of guard/characterization tests to prevent silent drift in manifests, shared-file regeneration, and CLI option parsing/interactive selection flows.

Changes:

  • Derive post_gen_tasks.get_component_file_mapping() from FileManifest via compute_file_mapping(); extend get_component_files() to support a “full footprint” for removals (option-gated extras included).
  • Introduce PluginSpec.marker_path and update aegis update feature detection to use registry-driven markers (instead of a hand-maintained path map).
  • Add/expand tests that lock in these contracts (derived mappings, marker correctness, shared-file completeness, CLI parsing/interactive selection behavior).

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
uv.lock Bumps typer dependency version in the lockfile.
CHANGELOG.md Adds release notes including the typer bump.
aegis/core/template_cleanup.py Uses AnswerKeys.ANSWERS_FILENAME instead of a hardcoded answers filename.
aegis/core/services.py Adds marker_path, derives i18n keys for service types, and refines AI/auth file manifests (incl. option-gated extras).
aegis/core/post_gen_tasks.py Replaces hand-maintained component→files dict with compute_file_mapping(); derives render context include-flags from registries.
aegis/core/plugins/spec.py Adds marker_path to PluginSpec for on-disk install detection.
aegis/core/manual_updater.py Ensures removal uses the full component/service footprint; uses AnswerKeys.ANSWERS_FILENAME.
aegis/core/file_manifest.py Documents and exposes compute_file_mapping() as the source for derived file mappings.
aegis/core/copier_updater.py Uses AnswerKeys.ANSWERS_FILENAME and derives service name set from the service registry.
aegis/core/copier_manager.py Uses AnswerKeys.ANSWERS_FILENAME for copier answers handling.
aegis/core/components.py Adds marker_path to components and models scheduler persistence as a manifest “extras” group.
aegis/core/component_files.py Adds full footprint support; consumes derived mappings; adds spec-extras folding.
aegis/config/shared_files.py Refactors shared-file policy declaration and documents the completeness test guard.
aegis/commands/update.py Derives feature detection from registry marker_path values; uses AnswerKeys.ANSWERS_FILENAME consistently.
aegis/commands/services.py Uses registry-provided i18n keys and enum declaration order for service-type grouping.
aegis/commands/plugins.py Uses AnswerKeys.ANSWERS_FILENAME when resolving answers from disk.
aegis/cli/interactive.py Introduces a step-engine + SelectionUI protocol for init selection; derives interactive add-service prompts from registry/service types.
aegis/cli/callbacks.py Collapses per-service option parsing blocks into a handler registry while preserving messages/side effects.
tests/core/test_file_mapping_derivation.py Adds guards that the mapping is derived, manifest paths exist, markers resolve, and footprints split correctly.
tests/core/test_constants_usage.py Adds a source scan guard to prevent hardcoding shared constants (answers filename, infra order drift).
tests/cli/test_update_feature_detection.py Adds characterization + registry-driven detection coverage for _detect_existing_features.
tests/cli/test_shared_files_completeness.py Adds a “minimal vs maximal stack diff” guard ensuring stack-dependent shared files are registered/allowlisted.
tests/cli/test_service_callbacks.py Characterization tests for bracket-syntax parsing and error messages in CLI callbacks.
tests/cli/test_remove_command.py Adds an end-to-end regression test ensuring AI option-gated extras are deleted on aegis remove ai.
tests/cli/test_interactive_service_selection.py Characterization tests for interactive add-service selection; verifies registry-driven offerings.
tests/cli/test_interactive_project_selection.py Characterization tests for init-flow selection and new scripted UI seam for the engine.
tests/cli/conftest.py Adds a stack fixture variant to generate AI with rag/voice enabled for remove-path regression testing.

Comment thread aegis/core/component_files.py Outdated
Comment thread aegis/core/component_files.py Outdated
Comment thread tests/core/test_file_mapping_derivation.py Outdated
@lbedner lbedner force-pushed the refactor-component-service-layer branch from 7c5c2ca to 081b7ef Compare June 10, 2026 01:47
@lbedner lbedner force-pushed the refactor-component-service-layer branch from 081b7ef to 0b84cd2 Compare June 10, 2026 02:49
@lbedner lbedner merged commit 802340b into main Jun 10, 2026
8 checks passed
@lbedner lbedner deleted the refactor-component-service-layer branch June 10, 2026 03:02
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.

2 participants