tng 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 953c1aca5e3a4e0da2fe7d31de410b02cdf10853ab296779684f351296517ac1
4
- data.tar.gz: a38a4a270b74d49e47755db0833d1940393d2a698bcd848f2a57e60dc4e3213f
3
+ metadata.gz: 845f4739c386b916aa51ee78b4ece762593ada069adf9fd383bf4419859af1e3
4
+ data.tar.gz: 9721ec8193dbcb8c2bd0ec5bebb3c45dc97f7f581e66e962646d0ec0352813d9
5
5
  SHA512:
6
- metadata.gz: 410291bfb5dd3ad926278e778eb9c3f0fcf965f627f6bf15cd56c2bfcafdb4411a26210087826cd90eb8cea9835ab95fe5c31743024be7a44860a9f420700dde
7
- data.tar.gz: 12c561e2c41a4fb339371445c53c5bfb1dfc3547d061c62a3c25d716d951be737e15422ad063807ff13d5d2176a09883b7ab4c3439ef9e56ee90a5b6cb4bd82a
6
+ metadata.gz: b1ab5fb4b3610facdc461c26e65eaeada8fffa3edcfbc7e874324f3c601d0483eea19bc8b4a823d85197ae578d7847be1dfee911cf1275afdcb67ea3ec701ff0
7
+ data.tar.gz: 81894fe76817515be70af384d1d9f575028a0d98a8c0965360eab6652935ee4a90bced345a2bc8936aa29220797bc09375815b9f1bd1682107b00d4d2a3e8f3c
data/README.md CHANGED
@@ -136,12 +136,8 @@ bundle exec tng --file app/models/order.rb --method calculate_total --trace
136
136
  # Short form
137
137
  bundle exec tng -f order.rb -m calculate_total -t
138
138
 
139
- # V2 trace schema (LLM-oriented rich events)
140
- bundle exec tng --file app/models/order.rb --method calculate_total --trace-v2
141
-
142
- # Compare V1 and V2 as raw JSON
143
- bundle exec tng --file app/models/order.rb --method calculate_total --trace --json > trace_v1.json
144
- bundle exec tng --file app/models/order.rb --method calculate_total --trace-v2 --json > trace_v2.json
139
+ # Raw trace as JSON
140
+ bundle exec tng --file app/models/order.rb --method calculate_total --trace --json > trace.json
145
141
  ```
146
142
 
147
143
  **Trace Features:**
@@ -151,14 +147,6 @@ bundle exec tng --file app/models/order.rb --method calculate_total --trace-v2 -
151
147
  - Method call chains
152
148
  - Mermaid diagram generation
153
149
 
154
- **V2 (LLM-Oriented) Additional Signals:**
155
- - Structured events (`ASSIGN`, `CALL`, `CASE`, `WHEN`, `OUTCOME`, `RETURN`, etc.)
156
- - Path-linked flow (`path_condition`, `parent_event_id`, `implicit_return`)
157
- - Structured call arguments (`args`, `positional_args`, `keyword_args`, `block_arg`)
158
- - Side-effect classification (`effects`: db/network/filesystem, tier, evidence)
159
- - Caller evidence (`match_path`, `match_evidence`, receiver/class hints)
160
- - Confidence context (`confidence_meta`) for safer downstream reasoning
161
-
162
150
  #### Regression Check
163
151
 
164
152
  Compare a method against its committed (`HEAD`) version and surface blast radius:
@@ -333,7 +321,6 @@ Path 3: !discount_code.present? → calculate_tax → total
333
321
  | `--method` | `-m` | Method name to analyze |
334
322
  | `--audit` | `-a` | Run audit mode |
335
323
  | `--trace` | `-t` | Run symbolic trace mode |
336
- | `--trace-v2` | | Run symbolic trace mode (V2 schema) |
337
324
  | `--impact` | | Run regression check mode |
338
325
  | `--clones` | `-c` | Run clone detection |
339
326
  | `--deadcode` | `-d` | Run dead code detection |
@@ -353,9 +340,6 @@ bundle exec tng -f payment_service.rb -m process -a
353
340
  # Symbolic trace
354
341
  bundle exec tng -f order.rb -m calculate_total -t
355
342
 
356
- # Symbolic trace V2
357
- bundle exec tng -f order.rb -m calculate_total --trace-v2
358
-
359
343
  # Regression check
360
344
  bundle exec tng -f payment_service.rb -m process --impact
361
345
 
data/bin/tng CHANGED
@@ -1725,30 +1725,6 @@ class CLI
1725
1725
  end
1726
1726
  end
1727
1727
 
1728
- def run_trace_for_method_v2(file_info, method_info)
1729
- result_path = nil
1730
-
1731
- @go_ui.show_spinner("Tracing #{method_info[:name]} (v2)...") do
1732
- begin
1733
- trace_json = fetch_trace_json(file_info, method_info, v2: true)
1734
-
1735
- f = Tempfile.new(['trace_v2', '.json'])
1736
- f.write(JSON.generate(trace_json))
1737
- f.close
1738
- result_path = f.path
1739
-
1740
- { success: true, message: "Trace v2 generated" }
1741
- rescue => e
1742
- { success: false, message: e.message }
1743
- end
1744
- end
1745
-
1746
- if result_path
1747
- @go_ui.show_trace_results(result_path)
1748
- File.unlink(result_path) if File.exist?(result_path)
1749
- end
1750
- end
1751
-
1752
1728
  def fetch_trace_json(file_info, method_info, v2:)
1753
1729
  project_root = Dir.pwd
1754
1730
  path = File.expand_path(file_info[:path])
@@ -1867,35 +1843,6 @@ class CLI
1867
1843
  run_trace_for_method(file_info, method_info)
1868
1844
  end
1869
1845
 
1870
- def run_direct_trace_v2
1871
- file_path = params[:file]
1872
- method_name = params[:method]
1873
-
1874
- unless method_name
1875
- puts @pastel.decorate("Please specify a method name with --method or -m", Tng::UI::Theme.color(:error))
1876
- return
1877
- end
1878
-
1879
- full_path = File.expand_path(file_path)
1880
- unless File.exist?(full_path)
1881
- puts @pastel.decorate("File not found: #{full_path}", Tng::UI::Theme.color(:error))
1882
- return
1883
- end
1884
- return unless ensure_not_ignored(full_path)
1885
-
1886
- relative_path = full_path.gsub("#{Dir.pwd}/", "")
1887
- namespaced_name = relative_path.sub(/\.rb\z/, "").split("/").map(&:camelize).join("::")
1888
- file_info = { path: full_path, name: namespaced_name }
1889
- method_info = { name: method_name, class_name: params[:class_name] }
1890
-
1891
- if params[:json]
1892
- puts JSON.generate(fetch_trace_json(file_info, method_info, v2: true))
1893
- return
1894
- end
1895
-
1896
- run_trace_for_method_v2(file_info, method_info)
1897
- end
1898
-
1899
1846
  def run_direct_call_sites
1900
1847
  file_path = params[:file]
1901
1848
  method_name = params[:method]
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/binaries/tng.bundle CHANGED
Binary file
data/lib/tng/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tng
4
- VERSION = "0.5.5"
4
+ VERSION = "0.5.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tng
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ralucab
@@ -201,7 +201,7 @@ metadata:
201
201
  source_code_uri: https://github.com/tng-sh/tng-rails-public
202
202
  license_uri: https://github.com/tng-sh/tng-rails-public/blob/main/LICENSE.md
203
203
  post_install_message: |-
204
- TNG v0.5.5 installed successfully!
204
+ TNG v0.5.6 installed successfully!
205
205
  Run 'bundle exec tng init' to get started.
206
206
  Use 'bundle exec tng --help' for usage information.
207
207
  rdoc_options: []