Repository navigation
fix(csharp): scope generators with Include and apply project naming on directory load - #456
Merged
Merged
Conversation
…mDirectory, refresh agent context first (#455)
…dated; Python seam corrected
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.
Fixes #455
No-mistakes took 1 run.
What Changed
Includepredicate to the C# generators (PerEntityGenerator,EntityGenerator,DbContextGenerator) and aGenContext.Narrow(...)helper. A hosted runner can scope a generator to a subset of objects, and report row models are held to the same predicate through the newGenContext.Scope.MetaDataLoader.FromDirectorynow reads the project'snamingfrom.metaobjects/config.jsonand applies it to the loaded root. Before, a host that composed its own registry got snake_case regardless of the project setting.MetadataLocation.ConfigForis nowinternal, and theMetaRoot.PhysicalNamingdoc comment is updated to match.meta upgradenow prints a first step: refresh the agent context withmeta init --docs-only --refresh-docsbefore acting on the upgrade guide. The upgrade guide and themetaobjects-codegenskills (and their conformance fixtures) are updated to match, andCHANGELOG.mdrecords the 1.1.2 fixes.Validation
Risk Assessment
✅ Low: The change is mostly docs plus an additive, default-null
Includeproperty and a naming read inFromDirectorythat mirrors the existingMetadataLocationpath. The one doc defect I found (the example predicate never matching) is fixed inline.Testing
Baseline passed. Two CLI scenarios driven live and pass. C# Include and FromDirectory naming verified only by unit tests (untested live, no disposable C# host). Full C# regression suites pass.
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
agent-context/skills/metaobjects-codegen/references/csharp.md:255- The codegen skill's C#Includeexample reado.Package == "acme::orders".MetaData.Packageholds only an explicit node-levelpackage; objects do not inherit the file'smetadata.rootpackage (Parser.cs ~line 650 'Objects and other types: don't inherit'). That value is inFileDefaultPackage. The predicate therefore matched nothing in the usual layout, and an agent copying it would silently generate no entities and no DbContext. I changed both lines toNamingRefs.EffectivePackageOf(o) == "acme::orders"(public, in namespaceMetaObjects, returnsPackage ?? FileDefaultPackage ?? "").server/csharp/MetaObjects.Codegen.Tests/GeneratorIncludeTests.cs:78- The newGenContext.Scopeplumbing is untested.NarrowcomposesScope, andReportRows.WithReportRowsuses it to filter report row models.GeneratorIncludeTestshas no model with a view-backed report, so a regression that stopsIncludefrom scoping report rows (routes, filter-allowlist, entity, db-context) would pass. Also,csharp.mdoption 2 tells a hand-builtGenContextto 'copy all of those members' and lists Root, Config, Warn and Applicability but notScope.✅ **Test** - passed
✅ No issues found.
scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsdotnet test server/csharp/MetaObjects.Codegen.Tests --filter GeneratorIncludeTests (4 passed)dotnet test server/csharp/MetaObjects.Conformance.Tests --filter MetadataLocationTests (8 passed)Live: meta upgrade in disposable project prints refresh-first lineLive: meta init --docs-only --refresh-docs scaffolds 36 agent-context filesRegression: dotnet test Codegen.Tests (987 passed, 1 skipped), Conformance.Tests (2077 passed), Cli.Tests (305 passed)agent-context/skills/metaobjects-codegen/references/owning-generators.md:54- Fixed stale Python row: narrowing is afilter=factory argument, not afilter(self, obj)method. Mirrored in SKILL.md and the six agent-context fixture copies; fixture copies match source byte-for-byte.CHANGELOG.md:1- Captain asked for a note that language standards are the normal path (no cross-port uniformity for conformance convenience). No docs owner exists for that principle; CLAUDE.md is human-owned and was not edited. Record as a feedback memory or a design-principles entry if wanted.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.