Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Screenplay generation and proxy generator hardening fixes - #2417

#2417
Closed
woksin wants to merge 6 commits into
mainCratis/Arc:mainfrom
claude/github-issues-triage-v3oqufCratis/Arc:claude/github-issues-triage-v3oqufCopy head branch name to clipboard
Closed

Screenplay generation and proxy generator hardening fixes#2417
woksin wants to merge 6 commits into
mainCratis/Arc:mainfrom
claude/github-issues-triage-v3oqufCratis/Arc:claude/github-issues-triage-v3oqufCopy head branch name to clipboard

Conversation

@woksin

@woksin woksin commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

A batch of small, well-scoped fixes from an open-issue triage sweep. Each is an independent commit.

Reviewer note: these changes were authored in an environment without a .NET SDK (the SDK download host was blocked), so they could not be compiled or tested locally. They were verified by careful inspection against the actual codebase APIs and follow existing spec conventions, but rely on CI for build/test confirmation. Please let CI validate before merge.

Fixed

🤖 Generated with Claude Code


Generated by Claude Code

claude added 4 commits July 29, 2026 09:51
#2381)

The role extraction only inspected named arguments, so the idiomatic
[Roles("...")] attribute — which sets Roles via a params string[] constructor —
yielded no roles. Also read the constructor argument array so both the
constructor and named-argument forms produce roles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1mrPcRT2GYjRxrx4T1p8N
)

Generator output emitted under obj/ contributes partial members to a
slice's namespace but says nothing about where the slice's source or its
screens live. Excluding generated files from folder attribution and the
project-root vote removes false SP0025 diagnostics and stops screen
discovery from scanning build-output trees.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1mrPcRT2GYjRxrx4T1p8N
…ers (#2398)

Constraint names written with separators (kebab-case is idiomatic for
Chronicle constraint names) were sanitized by deleting the separators,
producing run-together all-lowercase identifiers. Treat separators as word
boundaries and PascalCase the segments, so 'unique-timesheet-start' becomes
'UniqueTimesheetStart'. Names that carry no separator are left untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1mrPcRT2GYjRxrx4T1p8N
The WithMessage(_ => Messages.Constant) form - a lambda returning a
compile-time constant - was rejected as having no constant value, dropping
every message in applications that keep messages behind constants. Read the
lambda body's constant value, so both the constant and literal lambda forms
are recovered. Genuinely computed messages still have no constant and are
reported as before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1mrPcRT2GYjRxrx4T1p8N
@woksin woksin added the patch label Jul 29, 2026 — with Claude
claude added 2 commits July 29, 2026 10:37
- Qualify [Authorize] in RoleSecuredTypes spec to resolve CS0104 against
  the two AuthorizeAttribute types in scope
- Move static MessageExpression ahead of instance members (SA1204)
- Combine adjacent Where clauses in SliceDirectories (MA0029/RCS1112)
- Chain StringBuilder.Append calls in ScreenplayNaming (RCS1201)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1mrPcRT2GYjRxrx4T1p8N
Concepts referenced solely from inside a complex record or a read-model
property were dropped from a generated Screenplay document, taking their
validation rules and PII marking with them. The type registry now walks
the members of every record it names, cycle-safe and in ordinal order,
so a concept is declared wherever it was reached from.

A record an artifact carries has no declaration construct in the grammar,
so its shape is still lost - that loss is now reported with a new
Information diagnostic (SP0035) naming the record, rather than dropped
silently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1mrPcRT2GYjRxrx4T1p8N
Comment on lines +67 to +78
foreach (var property in type.DeclaredProperties())
{
var carried = UnderlyingTypes.Of(property.Type);
var name = carried.ToDisplayString();

found.TryAdd(name, carried);

if (IsRecord(carried) && walked.Add(name))
{
Walk(carried, found, walked);
}
}
@woksin

woksin commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Closing this as superseded, with its unique commit preserved rather than discarded.

Four of the five commits here are already implemented in #2418, in the same files, so the two cannot both merge cleanly:

here #2418
#2395 obj//bin/ in slice attribution ✅ with specs and a measured SP0025 3 → 0
#2398 separator-carrying names ✅ with specs, 31 names verified against a real application
#2397 WithMessage lambda constants ✅ with specs
#2400 concepts via child records ✅ with specs, concepts 105 → 140, @pii 27 → 29
#2381 proxy generator [Roles("…")]

#2381 has been extracted to #2419, rebased onto main. It did not compile as written — CS0104, because Cratis.Arc.Authorization and Microsoft.AspNetCore.Authorization both declare an Authorize attribute and both were imported; then CS1614 when aliased; then RCS1181 in Release. All three are fixed there, and the four when_extracting_roles specs pass on net8.0 and net9.0. The production change itself was correct as written.

One correction worth carrying over. The #2397 bullet here says messages are recovered "instead of dropping them as SP0016". On a real production application that recovers nothing: all 510 WithMessage calls resolve to resx-generated designer properties, which are runtime culture-dependent lookups with no constant value, so HasConstantValue cannot reach them. That finding is why #2409 was filed and implemented in #2418, emitting $strings. keys instead. Measured there: SP0016 643 → 510.

Also, the description carries an AI-attribution footer, which the repository's PR guidance asks not to include.

Nothing is lost by closing this — the branch is kept, four commits are superseded by tested equivalents, and the fifth is open as #2419.

@woksin woksin closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.