[Feature] Join PHP profile frames to the functions they ran

Open
#6,333 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Papito084 is already working on this.

Since Nov 26, 2026.

  • #6386 by @Papito084 — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
php, python
Domain
backend, testing

Research direction

Read the linked guide, then inspect packages/core/src/repowise/core/frame_resolver.py and the PHP speedscope fixture described in the issue. Confirm that Excimer frames include file and line, then run the fixture and check that at least 95% of repo samples join to one function, including closure frames. An open linked pull request indicates this work is already underway.

Written by the indexing model from the issue text.

Description

enhancement help wanted

Guide: follow Adding a language to runtime evidence: joining profile frames. It covers the change to frame_resolver.py, the join order, the fixture and the acceptance bar.

Summary

evidence add reads speedscope and collapsed stacks, but a .php frame never joins to a function.

packages/core/src/repowise/core/frame_resolver.py:264

if frame.language not in ("go", "python", "javascript"):
    return "unsupported_language"

Mechanism

  • Excimer's collapsed output names functions only, and the collapsed reader takes a path only from py-spy and perf-Python spellings (profile_formats/collapsed.py:28-32), so those frames have no file.
  • Excimer's speedscope export (ExcimerLog::getSpeedscopeData()) is the input to target: speedscope.py:101-111 reads file and line per frame.
  • frame_language already tags .php as php.

Repro

# one.py PATH LANG NAME: one indexed symbol, one frame inside it
import sys
from repowise.core.frame_resolver import ProfileFrame, resolve_frames
from repowise.core.workspace.repo_index import IndexedSymbol
path, lang, fn = sys.argv[1:4]
sym = IndexedSymbol(f"{path}::{fn}", fn, fn, "method", "", path, 1, 20, "public", lang)
r = resolve_frames([ProfileFrame(f"/repo/{path}", 5, lang, fn)], root="/repo", symbols_by_file={path: [sym]})
print(r.skipped)

python one.py src/Cart.php php total:

{'unsupported_language': 1}

Done looks like

  • Add php to FrameLanguage and a _php join: span by line, second signal from Class::method or a bare function name.
  • Fold {closure} frames into the enclosing method.
  • Confirm on the fixture that Excimer's speedscope frames carry file and line. If they do not, report that on the issue before writing a reader.
  • Must not change: other languages.

Tests

Excimer speedscope output of a small script with one closure, checked in with its sources. At least 95% of repo samples join to one function.

Dominant language
Python
Stars
7.1k
Forks
756
Avg merge
21h 5m
Merged PRs (30d)
797

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from repowise-dev/repowise

All issues in repowise-dev/repowise

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.