Repository navigation
Update the Components.Platform porting skill with rules settled by events, enums, and URL - #70417
Conversation
…ents, enums, and lists
|
Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at. |
|
Thanks for your PR, @jsakamotoIGJP. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the porting guidance and evaluation-scenario updates.
No open issues 🎉
What changed in this PR
Updates the Components.Platform porting skill to reflect settled browser API designs for future projections. This PR changes guidance and evaluation scenarios only, not product code.
Changes:
- Documents shared event listeners, caller-owned disposal, constructor projections, and static
FeatureContextfactories. - Updates type mappings for string-backed Web IDL enums, immutable returned lists, async iteration, and
ulong. - Adds three evaluation scenarios covering enums without defaults, Window events, and corrections to a Cache Storage proposal.
| File | Description |
|---|---|
eng/skill-evals/port-components-platform-api/eval.vally.yaml |
Adds three scenarios and rubrics for the updated porting rules. |
.github/skills/port-components-platform-api/SKILL.md |
Incorporates settled event, ownership, factory, naming, and lifecycle guidance. |
.github/skills/port-components-platform-api/references/type-mapping.md |
Defines updated enum, collection, numeric, and iterable mappings with testing guidance. |
Review effort: Balanced
|
Hi @ilonatommy, this updates the porting skill with the designs that were settled and merged since the last skill PR (events, Web IDL enums, |
|
✅ No documentation PR was created. Confidence that documentation is needed: 3% No docs needed: the PR only updates an internal repo porting skill and its eval, with no product or public API changes. Documentation surfaces considered
|
Update the porting skill with rules settled since Cookie Store
Description
This PR updates the
port-components-platform-apiskill. It does not change any product code.Several designs were settled and merged after the last skill update (#69989). The skill still told the agent to leave events out, to map a Web IDL enum to a C#
enum, and to stop and ask about objects that the caller owns. This PR turns those designs into rules.EventType<TTarget, TEvent>key per event,AddEventListenerAsyncthat returns anIAsyncDisposable, the shape JSON for the shared bridge, and noon<event>property.CookieStore.ChangeEventandWindow.StorageEventare the references.readonly structthat wraps the string, not a C#enumand not arecord struct.type-mapping.mdhas the parts every type needs, the two ways to handledefault(T)(with and without a Web IDL default), and the tests for each.sequence<T>orFrozenArray<T>becomesImmutableArray<T>. Cookie Store and URL still returnIReadOnlyList<T>. A separate PR will change them, and the skill tells the agent not to copy them until then.IAsyncDisposablethemselves, with no owner type. A Web IDL constructor becomesCreateAsyncon a<Type>Constructorobject, asWindow.Urldoes.iterable<>becomes methods that returnIAsyncEnumerable<T>, andforEachis not ported.FeatureContext(Pass a FeatureContext to Components.Platform feature factories #69993). The factory ofGetOrAddFeaturereceivesFeatureContextand is astaticlambda.NavigatorStorageManagerExtensionsfornavigator.storage. This one is new, so please tell me if you see it differently.unsigned long longmaps toulong.Rules that wait for open designs stay out. They are the members under
Navigator(#69968) and theAbortSignalmapping (#70044).Skill eval
I added three stimuli to
eng/skill-evals/port-components-platform-api/eval.vally.yaml. They cover a Web IDL enum with no default, an event onWindow, and a review of a Cache Storage proposal with an old list type, an owner type, and an extension class named after the property. I ran the smoke experiment locally (one trial per stimulus). The skilled variant passed 10 of the 11 stimuli (93.6%), and the baseline passed none (12.7%). The skilled miss was the existingverify-web-storage-lifecyclestimulus. The judge wanted theObjectDisposedExceptioncheck in the scenario after a successful acquisition, not only before first use. This PR does not change the lifecycle rules.Contributes to #69987