feat(native): add inspection primitives, dispatch traces and approved UI observation (#500)
* fix(hopper): normalize string-backed addresses and update verification * feat(native): add inspection primitives, dispatch traces and approved UI observation * test: prioritize real artifact E2E and captured golden regressions * fix(process): queue observed output before reactive rendering actions * test: prune redundant cases and strengthen boundary assertions * fix(cli): route native value tracing through shared workflows * test: replace synthetic success with real workflows and captured data * fix(catalog): separate portable metadata from native host availability
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{ "info": { "author": "xcode", "version": 1 } }
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"colors": [
|
||||
{
|
||||
"idiom": "universal",
|
||||
"color": {
|
||||
"color-space": "srgb",
|
||||
"components": {
|
||||
"red": "0.125",
|
||||
"green": "0.500",
|
||||
"blue": "0.875",
|
||||
"alpha": "1.000"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"info": { "author": "xcode", "version": 1 }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol ReaDispatchProtocol
|
||||
- (void)performAction:(id)sender;
|
||||
@optional
|
||||
- (int)optionalFixtureValue;
|
||||
@end
|
||||
|
||||
@interface ReaDispatchFixture : NSObject <ReaDispatchProtocol> {
|
||||
int state;
|
||||
}
|
||||
- (void)performAction:(id)sender;
|
||||
+ (int)fixtureVersion;
|
||||
@end
|
||||
@implementation ReaDispatchFixture
|
||||
- (void)performAction:(id)sender { state += sender == nil ? 1 : 2; }
|
||||
+ (int)fixtureVersion { return 1; }
|
||||
@end
|
||||
int main(void) { return 0; }
|
||||
@@ -0,0 +1,12 @@
|
||||
public protocol ReaWitnessFixtureProtocol { func fixtureValue() -> Int }
|
||||
public struct ReaWitnessFixture: ReaWitnessFixtureProtocol {
|
||||
public init() {}
|
||||
public func fixtureValue() -> Int { 17 }
|
||||
}
|
||||
@_cdecl("rea_witness_fixture_entry")
|
||||
public func fixtureEntry() -> Int { ReaWitnessFixture().fixtureValue() }
|
||||
|
||||
public class ReaVtableFixture {
|
||||
public init() {}
|
||||
public func fixtureValue() -> Int { 23 }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import Foundation
|
||||
|
||||
final class ReaArchiveRecord: NSObject, NSCoding {
|
||||
var link: ReaArchiveRecord?
|
||||
override init() { super.init() }
|
||||
required init?(coder: NSCoder) { super.init() }
|
||||
func encode(with coder: NSCoder) {
|
||||
coder.encode(link, forKey: "cycle")
|
||||
coder.encode(Data([0, 1, 2, 255]), forKey: "payload")
|
||||
coder.encodeConditionalObject(nil, forKey: "conditional")
|
||||
}
|
||||
}
|
||||
let record = ReaArchiveRecord()
|
||||
record.link = record
|
||||
let data = try NSKeyedArchiver.archivedData(withRootObject: [record, record] as NSArray, requiringSecureCoding: false)
|
||||
try data.write(to: URL(fileURLWithPath: CommandLine.arguments[1]))
|
||||
@@ -0,0 +1,21 @@
|
||||
import AppKit
|
||||
|
||||
let app = NSApplication.shared
|
||||
app.setActivationPolicy(.accessory)
|
||||
let window = NSWindow(contentRect: NSRect(x: 120, y: 120, width: 360, height: 180), styleMask: [.titled, .closable], backing: .buffered, defer: false)
|
||||
window.title = "REA source-owned UI verification"
|
||||
final class FixtureController: NSObject {
|
||||
@objc func increment(_ sender: NSButton) { sender.title = "REA fixture incremented" }
|
||||
}
|
||||
let controller = FixtureController()
|
||||
let button = NSButton(frame: NSRect(x: 30, y: 60, width: 280, height: 40))
|
||||
button.title = "Increment REA fixture"
|
||||
button.target = controller
|
||||
button.action = #selector(FixtureController.increment(_:))
|
||||
window.contentView?.addSubview(button)
|
||||
window.orderFront(nil)
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
let record = "{\"pid\":\(ProcessInfo.processInfo.processIdentifier),\"window_id\":\(window.windowNumber)}\n"
|
||||
FileHandle.standardOutput.write(Data(record.utf8))
|
||||
}
|
||||
app.run()
|
||||
Reference in New Issue
Block a user