Upload a local run's report (simulator, emulator, device): the CLI side

Abierto
#442 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
flutter, go
Área
cli, testing

Línea de trabajo

Start at the probe test --upload-report CLI path, then read hosted.CIFromEnv and hosted.Preflight, which the issue names as the current blockers. The requested work spans local Git and device facts, run sequencing, optional key enrollment, and updates to MCP descriptions, CLI and configuration docs, VS Code surfaces, and the changelog; the dirty-tree hash and keychain behavior are still open questions. Done means the acceptance criteria pass and all existing flags, report JSON, and envelope schema remain compatible.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area/cli area/cloud enhancement

What this is

Today probe test --upload-report only works inside GitHub Actions: hosted.CIFromEnv returns nothing elsewhere and hosted.Preflight refuses a payload without CI facts ("only --upload-dry-run works outside CI"). A developer who runs the suite on a local simulator, emulator or device has no way to send that run's report. This issue describes only what the CLI would need. No code yet; how a service treats such a run is out of scope here.

What the CLI would need

  1. A local mode. An explicit opt-in (probe test --upload-local or hosted.mode: local), never implied by --upload-report. The envelope says ci.provider: "local" (an additive value); everything stays optional and the report JSON and its schema value do not change. --upload-dry-run prints every field, as today.
  2. Git facts without CI variables. Commit (git rev-parse HEAD), branch (or HEAD when detached), and a dirty-tree flag plus a hash of the working tree so a run on uncommitted changes is never labelled as "the result of commit C". The hash definition must be stable across platforms and cheap on large repositories (open question: git stash create versus a hash of git diff HEAD plus untracked files).
  3. Device identity without personal identifiers. device_class and the platform/OS version already exist; add a short model string. Never a serial number or UDID, which identify a person's hardware.
  4. A run sequence. Outside CI there is no run id, so the client makes a monotonic one (for example milliseconds since the epoch plus a per-key counter) and a run_attempt of 1.
  5. Signer key enrolment (optional, later). An Ed25519 key generated on the developer's machine and stored in the OS keychain (macOS, Linux and Windows differ), enrolled once through a documented command (probe cloud enrol), with the envelope signed over its canonical bytes. The envelope carries only the key fingerprint (16 hex characters). No name or email goes into the envelope.
  6. Scrubbing and size limits are unchanged: relative paths, secret patterns, no artifacts, the 1 MiB / 5,000-result caps, retries on a busy service.

Constraints

  • Additive only: existing flags, config, the report JSON and the envelope schema keep working.
  • Nothing is sent unless the user opts in, and the docs state the hosted service is a preview and not live yet.
  • Any new flag or config key also updates the MCP descriptions, the CLI reference, the configuration page, the VS Code surfaces and the CHANGELOG.

Acceptance criteria (for a later implementation PR)

  • Tests: a local run builds an envelope with the git facts; a dirty tree sets the flag and the tree hash; a detached HEAD gives HEAD; a repository without commits and a non-git directory give a clear refusal, never a half-filled envelope.
  • No serial, UDID, user name, e-mail address or absolute path appears in the dry-run output.
  • Key custody: the private key never leaves the keychain, is never printed or logged, and signing fails closed when the keychain is unavailable.

Open questions

  • The dirty-tree hash definition (see 2).
  • Keychain access on each OS and a fallback for headless machines.
  • Whether the sequence needs a hash of the previous envelope so that a missing or reordered run is detectable on the client side.
Lenguaje dominante
Go
Estrellas
6
Forks
3
Merge medio
6 h 28 min
PR fusionados (30 d)
362

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AlphaWaveSystems/flutter-probe

Todos los issues de AlphaWaveSystems/flutter-probe

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.