8000 [EXPERIMENT] Restack direct-object widening on current Biome main by teamleaderleo · Pull Request #8 · teamleaderleo/biome · GitHub
[go: up one dir, main page]

Skip to content
8000

[EXPERIMENT] Restack direct-object widening on current Biome main - #8

Draft
teamleaderleo wants to merge 3 commits into
mainfrom
fieldwork/11174-current-main-direct-object
Draft

teamleaderleo wants to merge 3 commits into
mainfrom
fieldwork/11174-current-main-direct-object

Conversation

@teamleaderleo
Copy link
Copy Markdown
Owner

Exact-current-main execution carrier for the direct object-literal portion of Biome issue 11174.

Historical internal PR #4 reproduced the defect and passed its scoped candidate on the August 2 source base. Biome main has since advanced through the type-inference refactor in biomejs#11010.

This carrier targets exact public main 4a0bc5c46e6dbbefd17fa133ea426aa41f0a23f8 and exact local_inference.rs blob c8559d60bd1fb322ab4bf82394878362bad84a3b. The refactor preserved the object-member constructor but renamed the collector path, so the candidate is freshly materialized rather than replayed blindly.

Declared scope remains:

  • widen mutable direct boolean, number, and string object-property literals;
  • preserve as const literal inference;
  • cover nested direct object members;
  • leave generic-returned properties such as useRef<T>() unresolved.

The workflow formats the exact transformed source, checks biome_js_type_info, runs the focused analyzer suite, retains the exact three-file diff, and performs no canonical-upstream interaction.

@github-actions
github-actions Bot commented Aug 5, 2026
Copy link
Copy Markdown

❌ Automation signals

Activity patterns show signs of automation.

View full analysis →

This is an automated analysis by AgentScan


- name: Upload exact candidate evidence
if: always()
uses: actions/upload-artifact@v4
Copy link
Copy Markdown
Owner Author

Exact current-main result

Workflow 30976048058, job 92210131025, completed successfully at carrier head 42457ccdc163d2a2b71765f731d8e3e93ac7dad7 against exact canonical Biome main 4a0bc5c46e6dbbefd17fa133ea426aa41f0a23f8 and exact local_inference.rs blob c8559d60bd1fb322ab4bf82394878362bad84a3b.

Completed gates:

  • exact canonical source/blob identity;
  • fresh post-refactor source transformation;
  • exact three-file candidate fence, including generated valid fixture and snapshot;
  • repository formatting;
  • cargo check -p biome_js_type_info;
  • focused no_unnecessary_conditions suite;
  • final bounded diff verification.

Artifact 8918352767, digest sha256:366e420c2138986854b01d6181801afa8f3ece4b5f88d4f1aba5cd7a03d0cd62.

Disposition: EXACT-CURRENT-MAIN DIRECT-OBJECT CANDIDATE FOCUSED-GREEN / ISSUE REMAINS PARTIAL.

Generic-returned property cases such as useRef<boolean>(false) and useRef<number>(0) remain unresolved. No canonical-upstream interaction occurred.

Copy link
Copy Markdown
Owner Author

Residual useRef source-owner probe — no execution triggered

Current canonical main is f1f72fefbe9a6a777d083277a792a4a498b88915, one dependency-maintenance commit beyond this carrier's exact green base. No JS type-inference source changed.

The remaining useRef cases are not owned by the direct-object constructor fixed here:

  1. TypeData::from_any_js_expression records a call as a callee plus value arguments only. It does not retain explicit call type arguments.
  2. flattened_function_call resolves the generic return shape, and infer_generic_arg substitutes the concrete argument reference directly wherever the return type uses the generic.
  3. For useRef(false), that concrete reference is the literal type false, so the returned RefObject<T>.current remains false.
  4. useRef<boolean>(false) currently follows the same path because the explicit <boolean> is discarded before flattening.

Bounded design split:

  • First lane: extend TypeofCallExpression to preserve explicit type arguments and prefer those substitutions over value-argument inference. This should fix the explicit useRef<boolean>(false) case without changing unannotated generic inference.
  • Second lane: for inferred generics, widen a literal only when that generic flows into a writable returned member. Do not globally widen generic arguments: identity(false) should remain the literal false, while useRef(false).current should be mutable boolean. This needs mutability/readonly-aware occurrence analysis in the returned object/interface shape.

Disposition of this PR remains unchanged: scoped accept for direct mutable object properties; incomplete for generic-returned mutable objects. No new branch, workflow, or upstream interaction was created by this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0