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 +4 -4
- data/README.md +2 -18
- data/bin/tng +0 -53
- data/binaries/go-ui-darwin-amd64 +0 -0
- data/binaries/go-ui-darwin-arm64 +0 -0
- data/binaries/go-ui-linux-amd64 +0 -0
- data/binaries/go-ui-linux-arm64 +0 -0
- data/binaries/tng-darwin-arm64.bundle +0 -0
- data/binaries/tng-darwin-x86_64.bundle +0 -0
- data/binaries/tng-linux-arm64.so +0 -0
- data/binaries/tng-linux-x86_64.so +0 -0
- data/binaries/tng.bundle +0 -0
- data/lib/tng/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 845f4739c386b916aa51ee78b4ece762593ada069adf9fd383bf4419859af1e3
|
|
4
|
+
data.tar.gz: 9721ec8193dbcb8c2bd0ec5bebb3c45dc97f7f581e66e962646d0ec0352813d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
#
|
|
140
|
-
bundle exec tng --file app/models/order.rb --method calculate_total --trace
|
|
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]
|
data/binaries/go-ui-darwin-amd64
CHANGED
|
Binary file
|
data/binaries/go-ui-darwin-arm64
CHANGED
|
Binary file
|
data/binaries/go-ui-linux-amd64
CHANGED
|
Binary file
|
data/binaries/go-ui-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/binaries/tng-linux-arm64.so
CHANGED
|
Binary file
|
|
Binary file
|
data/binaries/tng.bundle
CHANGED
|
Binary file
|
data/lib/tng/version.rb
CHANGED
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.
|
|
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.
|
|
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: []
|