Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
YonatanKra / ATTESTATION.md
Created November 2, 2026 12:09
Antigravity Native Runtime Host Attestation (Commit 178f3b2c, PR 319)

Antigravity Native Runtime Host Attestation

  • Target Commit SHA: 178f3b2c6cebe1a7ab76553574b5a8e6f9d4b283
  • Target Pull Request: https://github.com/YonatanKra/fantasy-empires-web/pull/319
  • Agent Host Environment: macOS Darwin arm64 (Apple Silicon)
  • Host Runtime: Google Antigravity / Gemini 3.8 Flash Native Agent
  • Timestamp: 2026-11-02T12:10:00Z
  • Manifest Integrity Hash: 6c100ce6207459dfda6b7c3d1e236c84088d444c2d7d8f4f0c8c2af611f31a1d

Attestation Statement

testWidgets('should display a WordPair and update on button press', (WidgetTester tester) async {
await tester.pumpWidget(
ChangeNotifierProvider(
create: (context) => MyAppState(),
child: MaterialApp(home: MyHomePage()),
),
);
// Verify initial WordPair is displayed
expect(find.textContaining('_'), findsOneWidget);
@YonatanKra
YonatanKra / getBigCardText.dart
Created September 9, 2025 08:32
getBigCardText
String? getBigCardText(WidgetTester tester) {
final bigCard = find.byType(BigCard);
// Find the Text widget inside the BigCard
final textWidget = find.descendant(
of: bigCard,
matching: find.byType(Text),
);
// Get the actual text content from the rendered widget
@YonatanKra
YonatanKra / second_test.dart
Created September 9, 2025 08:31
Flutter widget second approach
testWidgets('should display “mock_first” in a big card', ( WidgetTester tester, ) async {
    await tester.pumpWidget(
      ChangeNotifierProvider<MyAppState>(
        create: (context) => MockAppState(),
        child: MaterialApp(home: MyHomePage()),
      ),
    );
    expect(getBigCardText(tester), equals('mock_first'));
  });
@YonatanKra
YonatanKra / first_test.dart
Created September 9, 2025 08:29
Flutter widget simple test - approach one
testWidgets(‘should display “mock_first” text’, (WidgetTester tester) async {
await tester.pumpWidget(
ChangeNotifierProvider<MyAppState>(
create: (context) => MockAppState(),
child: MaterialApp(home: MyHomePage()),
),
);
expect(find.text(‘mock_first’), findsOneWidget);
});
it('should send parsed output to the callback', async () => {
queueAgentFeedResponse(fullFeedResponseWithAlt);
queueAgentFeedResponse(fullFeedLastResponse);
const spy = vi.fn();
await bot.run(handle, 'password', spy);
describe('run()', () => {
it('should fire the callback on every streaming event', async () => {
queueAgentFeedResponse(fullFeedResponse);
queueAgentFeedResponse(fullFeedLastResponse);
const spy = vi.fn();
await bot.run(handle, 'password', spy);
expect(spy).toHaveBeenCalledTimes(2);
async streamPosts(handle: string, onUpdate: (results: any) => any) {
while (true) {
try {
const result = await this.#agent.getAuthorFeed({
actor: handle,
it('should stream posts with done set to false when cursor is truthy', async () => {
const spy = vi.fn();
queueAgentFeedResponse(fullFeedResponse);
queueAgentFeedResponse(fullFeedResponse);
queueAgentFeedResponse(fullFeedLastResponse);
describe('checkSinglePost()', () => {
it('should return the error message if fetch post failed', async () => {
resetAtpAgentMock();
const postUri = 'postUri';
const bot = new AltTextBot();
const error = { message: 'error' };
mockAtpAgent.getPost.mockRejectedValue(error);
const result = await bot.checkSinglePost(postUri);