feat: enable Aspire dashboard and add seed data support#118
Merged
Conversation
- Enable the .NET Aspire dashboard (removed DisableDashboard) - Add SeedDataService that uploads skills/sub-agents from seed/ directory - Seed data controlled by SkillServer:SeedData config flag (default false) - AppHost sets SeedData=true in development with sample skills and sub-agents - Seed files: dockerfile-hardening, code-review-checklist skills + static-analysis-auditor, dependency-impact-analyzer sub-agents - Idempotent seeding - skips existing versions gracefully
The AppHost had no launch profile, so `dotnet run` failed at startup: the dashboard resource requires ASPNETCORE_URLS and an OTLP endpoint URL, both normally supplied by a launch profile's environment variables. Add https/http profiles defining applicationUrl plus the ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL and ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL variables. Verified the https profile starts the distributed application and serves the dashboard.
The two seed skills declared `metadata.tags` as a YAML list. The parser deserializes frontmatter `metadata` into Dictionary<string,string>, so a sequence value threw during deserialization and ParseFrontmatter returned null — the whole skill was rejected with "missing or invalid YAML frontmatter." Sub-agents seeded fine because they carry no metadata block. Convert `tags` to a comma-separated string to match the string-valued metadata contract (same shape the tests and metadata[...] lookups assume). Verified against a fresh DB: both skills and both sub-agents now seed and are returned by /api/v1/skills and /api/v1/subagents.
Frontmatter `metadata` deserializes into Dictionary<string,string>, so any value that wasn't a plain scalar (e.g. `tags: [a, b, c]`) threw during parsing and silently discarded the entire skill. Add a YamlDotNet type converter that coerces every metadata value to a string regardless of node shape: sequences join with ", ", nested mappings flatten to "key: value", and unknown nodes are skipped rather than fatal. Consumers still read Dictionary<string,string>, so nothing downstream changes. Restore the seed skills' `tags` to natural YAML list form (now that it parses) and drop their `metadata.subagent` references, which pointed at sub-agents that don't exist. Add an integration test asserting a skill with list-valued metadata uploads successfully and its sibling scalar metadata (category) still parses.
BuildZip pins every entry to a fixed 1980-01-01 timestamp for deterministic output. The ZIP format stores DOS date/time with no timezone, so on read-back System.IO.Compression returns a DateTimeOffset in the machine's local offset. The test compared the full DateTimeOffset, so it passed only on UTC machines and failed everywhere else (e.g. -06:00) even though the archive bytes are identical and correct. Assert on the wall-clock DateTime component instead, which is what the format round-trips deterministically regardless of the runner's timezone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Dashboard
DisableDashboard = true)http://localhost:15888with SkillServer resource visibleSeed Data
SeedDataServicethat scans a configurable seed directory on startup and uploads skills/sub-agents via existing upload servicesSkillServer:SeedDataconfig flag (defaultfalse— off in production)SeedData=truein development viaappsettings.Development.jsonSkillServer:SeedPath(defaults to./seed)Sample Seed Data
dockerfile-hardening(security),code-review-checklist(code-quality)static-analysis-auditor(Compaction),dependency-impact-analyzer(Main)Config
SkillServer:SeedData— bool to enable/disable seeding (default: false)SkillServer:SeedPath— path to seed directory (default: ./seed)SkillServer:DataPath— persisted indata/(already existed, now explicit in AppHost)Operational Modes
SeedData: false(default)SeedData: true+ seed filesVerification