Skip to content

docs(adr): propose ADR 0071 harness snapshot for agent traces - #5505

Closed
HofniGartner wants to merge 1 commit into
fullsend-ai:mainfrom
HofniGartner:feat/adr-0071-harness-snapshot
Closed

docs(adr): propose ADR 0071 harness snapshot for agent traces#5505
HofniGartner wants to merge 1 commit into
fullsend-ai:mainfrom
HofniGartner:feat/adr-0071-harness-snapshot

Conversation

@HofniGartner

Copy link
Copy Markdown

Summary

Propose ADR 0071: Level-1 harness-snapshot.json plus root-span forge pointers as the run-time join contract. Docs only — implementation is a separate issue/PR per CONTRIBUTING.

Related Issue

Implementation checklist: #5449 (after this ADR is accepted)

Changes

  • Add proposed ADR 0071 (harness-snapshot.json at run start; mirror join keys on root span; consumers read the artifact, not eval-script CI env exports)
  • Point the distributed tracing guide at ADR 0071 as proposed (no Go in this PR)

Testing

  • Docs-only — no code/lint/test changes required for this PR
  • ADR number still free on main at merge (/renumber-adr if needed)

Checklist

  • PR title follows Conventional Commits
  • Commits are signed off (DCO)
  • I wrote this contribution myself and can explain all changes in it

Made with Cursor

Record Level-1 harness-snapshot.json and root-span forge pointers as
the run-time join contract; implementation follows in a separate issue.

Signed-off-by: Hofni Gartner <hgartner@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@HofniGartner
HofniGartner requested a review from a team as a code owner July 23, 2026 06:58
@github-actions github-actions Bot closed this Jul 23, 2026
@github-actions

Copy link
Copy Markdown

Thank you for your interest in contributing to fullsend, @HofniGartner.

This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer.

To get vouched:

  1. Open a Vouch Request discussion.
  2. Describe what you want to change and why.
  3. Write in your own words — do not have an AI generate the request.
  4. A maintainer will comment /vouch if approved.
  5. Once vouched, open a new PR (preferred) or reopen this one.

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Propose ADR 0071: harness snapshot + forge pointer join contract for traces

📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Propose ADR 0071 defining harness-snapshot.json as the run-start join artifact.
• Specify mirroring forge/CI join keys onto the root run span for OTLP backends.
• Update distributed tracing guide to reference the proposed ADR and artifact set.
Diagram

graph TD
  A["fullsend run"] --> B["harness-snapshot.json"] --> E["Downstream consumers"]
  A --> C["run-telemetry.jsonl"] --> E
  A --> D["Root run span attrs"] --> F["OTLP backend"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Root-span-only correlation (no snapshot file)
  • ➕ No additional artifact to manage on disk
  • ➕ Single source for join keys in tracing backends
  • ➖ Local/offline consumers must parse spans or require an OTLP backend
  • ➖ Harder to guarantee availability when span export is disabled or unavailable
2. Embed snapshot into `run-telemetry.jsonl` as a header/event
  • ➕ One Level-1 file instead of two
  • ➕ Keeps all run metadata in the telemetry stream
  • ➖ Couples harness/config contract to telemetry format and exporter semantics
  • ➖ Harder for non-tracing consumers to treat as a stable run-start contract
3. Continue relying on eval-script CI env exports
  • ➕ No new artifact format
  • ➕ Simple to prototype in wrapper scripts
  • ➖ Ambient CI env is not a stable or portable source of truth
  • ➖ Breaks local runs and complicates dispatched/child runs; encourages scraping rather than explicit contracts

Recommendation: The proposed approach (dedicated harness-snapshot.json + mirroring join keys onto the root span) is the most robust split of concerns: a stable local run-start contract for offline/forensic consumers, plus backend-friendly correlation for OTLP. The main follow-up to watch is crisp field ownership and precedence (FULLSEND_* vs CI vars) in the eventual implementation.

Files changed (2) +106 / -6

Documentation (2) +106 / -6
0071-forge-pointer-correlation-for-agent-traces.mdAdd proposed ADR 0071 defining harness snapshot + forge pointer correlation +96/-0

Add proposed ADR 0071 defining harness snapshot + forge pointer correlation

• Introduces a new Proposed ADR specifying a run-start 'harness-snapshot.json' artifact containing harness identity, content hash, forge/CI pointers, and trace join keys. Defines mirroring the same join keys onto the root 'run' span and clarifies non-goals (no diffs/prompts, no CI-export-based contract).

docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md

distributed-tracing.mdDocument Level-1 artifacts and reference proposed ADR 0071 +10/-6

Document Level-1 artifacts and reference proposed ADR 0071

• Updates the distributed tracing guide to describe Level-1 outputs as a set of artifacts and links 'harness-snapshot.json' to the proposed ADR 0071. Clarifies that 'OTEL_SDK_DISABLED=true' suppresses span export (local file + OTLP) while the snapshot is pending implementation until ADR acceptance.

docs/guides/infrastructure/distributed-tracing.md

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📜 Skill insights (6)

Context used
✅ Compliance rules (platform): 54 rules

Grey Divider


Action required

1. ADR 0071 missing ## Options 📜 Skill insight ⚙ Maintainability
Description
ADR 0071 does not include the ## Options section from the ADR template. This deviates from the
required ADR structure and omits the standardized place to capture alternatives.
Code

docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[R21-42]

+## Context
+
+[ADR 0050](0050-distributed-tracing-instrumentation.md) defines how fullsend
+generates traces (OTel Go SDK; Level 1 = `run-telemetry.jsonl`; Level 2 =
+OTLP). [Operational observability](../problems/operational-observability.md)
+requires forge **pointers** (repo + SHA, change id, pipeline run) rather than
+duplicating diffs, and a stable answer to: “what harness/config produced this
+run?”
+
+After the OTel SDK migration, `run-summary.json` was removed; the sole Level 1
+telemetry file is `run-telemetry.jsonl`. Eval wrappers that `export` ambient CI
+variables are the wrong layer: harness identity is a **run-time** concern of
+`fullsend run`, and downstream tools must not scrape CI env as the source of
+truth.
+
+Cross-project join field semantics (Provenance / MLflow tag names) live in the
+shared join contract maintained with the certification report schema; this ADR
+decides only what **fullsend** writes.
+
+## Decision
+
+### 1. Harness snapshot artifact (Level 1)
Relevance

⭐⭐⭐ High

Repo has accepted adding missing ## Options sections to ADRs to align with conventions.

PR-#2743

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ADR template includes an ## Options section, but this ADR transitions from ## Context
directly to ## Decision without an ## Options section.

docs/ADRs/0000-adr-template.md[25-41]
docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[21-44]
Skill: writing-adrs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The ADR omits the `## Options` section required by the ADR template structure.

## Issue Context
The project ADR template includes an `## Options` section (optional only when genuinely unnecessary). This ADR discusses at least one alternative approach (e.g., relying on eval scripts/CI env), so the template section should be present to document options.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[21-42]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Missing > **Planned:** callout 📜 Skill insight ≡ Correctness
Description
The new text describes a not-yet-implemented feature (harness-snapshot.json) without the required
> **Planned:** callout format and issue link. This can mislead readers about current functionality
and removes the required tracking reference.
Code

docs/guides/infrastructure/distributed-tracing.md[R16-19]

+- **`harness-snapshot.json`** — proposed in
+  [ADR 0071](../../ADRs/0071-forge-pointer-correlation-for-agent-traces.md)
+  (run-start harness fingerprint and forge/CI pointers). Implementation follows
+  ADR acceptance; until then only `run-telemetry.jsonl` is guaranteed on disk.
Relevance

⭐⭐ Medium

Planned-callout enforcement is mixed; related precedent rejected adding issue link, not absence of
callout.

PR-#3903

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The guide introduces harness-snapshot.json as not yet implemented ('Implementation follows ADR
acceptance; until then...') but does not use the required planned-feature callout format or include
an issue link.

docs/guides/infrastructure/distributed-tracing.md[16-19]
Skill: writing-user-docs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A planned feature is documented without the required `> **Planned:**` blockquote callout and without linking to the relevant tracking issue.

## Issue Context
The guide states `harness-snapshot.json` is only proposed / not yet guaranteed, which is planned functionality and must be formatted accordingly.

## Fix Focus Areas
- docs/guides/infrastructure/distributed-tracing.md[16-20]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. ADR 0071 has multiple decisions 📜 Skill insight ⚙ Maintainability
Description
ADR 0071 makes multiple distinct decisions (snapshot artifact, root span attributes, and explicit
non-decisions) instead of recording exactly one decision. This reduces traceability and makes it
harder to supersede or refine individual decisions cleanly.
Code

docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[R40-78]

+## Decision
+
+### 1. Harness snapshot artifact (Level 1)
+
+Every `fullsend run` writes **`harness-snapshot.json`** into the run output
+directory (next to `run-telemetry.jsonl`) at run start, after the root span
+exists.
+
+Contents are pointers and a config fingerprint only (no diffs, prompts, or
+skill bodies), including at least:
+
+- Harness identity: agent, role, slug, model, skills, harness path
+- `harness_content_sha` (content hash of the resolved harness file)
+- Forge/CI pointers when known: `forge_platform`, `repository_url`,
+  `ref_revision`, `ref_name`, `change_id`, `pipeline_run_id`,
+  `pipeline_run_url`
+- Trace join: `trace_id`, `traceparent`
+
+Forge/CI fields are filled by fullsend when writing the snapshot (`FULLSEND_*`
+overrides first, then standard CI env). Downstream consumers **read the JSON
+file** (and/or later stores that ingest it), not ambient CI env.
+
+`OTEL_SDK_DISABLED=true` suppresses span export (`run-telemetry.jsonl` / OTLP)
+but **does not** suppress `harness-snapshot.json` — it is the run-start config
+contract, not span export.
+
+### 2. Root span attributes (Level 1 + Level 2)
+
+The same join keys are set on the root `run` span (`vcs.*`, `cicd.*`,
+harness content SHA, forge platform) so OTLP backends receive them without
+parsing the JSON. Local JSON remains the forensic / handoff contract.
+
+### 3. What we do not do
+
+- Do **not** treat eval scripts’ CI env exports as the harness-snapshot path.
+- Do **not** embed PR diffs or prompt content in the snapshot.
+- Do **not** redefine cross-project report field ownership in this ADR; link
+  the shared join contract from Related.
+
Relevance

⭐⭐ Medium

No close precedent that ADRs must contain exactly one decision; multi-part Decision sections may be
tolerated.

PR-#2743

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The Decision section is explicitly split into multiple distinct decisions ("1", "2", and "3"), which
violates the single-decision requirement.

docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[40-78]
Skill: writing-adrs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The ADR contains multiple separate decisions under `## Decision` (numbered subsections) rather than a single decision.

## Issue Context
Compliance requires each ADR to record exactly one decision; separate decisions should be split into separate ADRs or narrowed so the ADR has one core decision.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[40-78]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

4. ADR 0071 uses Proposed 📘 Rule violation ⚙ Maintainability
Description
ADR 0071 declares status: Proposed in its frontmatter and repeats “Proposed” in the body, but the
repository’s ADR lifecycle vocabulary only allows Accepted, Deprecated, or Superseded. This
makes the ADR nonconforming with documented conventions and likely to fail CI/lint validation tied
to ADR status correctness.
Code

docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[R1-3]

+---
+title: "71. Harness snapshot and forge pointer correlation for agent traces"
+status: Proposed
Relevance

⭐⭐ Medium

ADR template explicitly uses status: Proposed, so this repo may allow Proposed despite claimed
lifecycle limits.

PR-#39
PR-#1578

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
ADR 0071 explicitly sets status: Proposed in the YAML frontmatter and also lists “Proposed” under
its ## Status section, showing it is using a status outside the permitted set. The ADR policy
documented in ADR 0001 enumerates the valid statuses as Accepted, Deprecated, or Superseded
and notes that CI linting validates ADR status/frontmatter correctness, so the use of Proposed
conflicts with the documented contract and would violate repository conventions and/or validation.

Rule 1062061: Restrict ADR status to accepted values
docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[1-5]
docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[17-20]
docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[1-19]
docs/ADRs/0001-use-adrs-for-decision-making.md[39-63]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
ADR 0071 uses a `status` value (`Proposed`) in both frontmatter and the body `## Status` section, but the repository’s ADR policy restricts valid statuses to `Accepted`, `Deprecated`, or `Superseded` and indicates CI linting validates ADR status/frontmatter correctness.

## Issue Context
Allowed ADR `status` values are `Accepted`, `Deprecated`, or `Superseded` only.
- If this ADR is intended to be merged as a finalized decision record, update ADR 0071 to use an allowed status value (typically `Accepted`) and align the body `## Status` section accordingly.
- If the intent is to support “Proposed” ADRs in this repository, then ADR 0001 and the ADR lint configuration would need to be updated to include/accept `Proposed` (those config changes are not shown here).
- If the decision is not yet accepted and the process is to only store accepted decisions as ADRs, consider relocating this document to a non-ADR area (e.g., plans/spikes) until it is accepted.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[1-20]
- docs/ADRs/0001-use-adrs-for-decision-making.md[42-63]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. ADR 0071 consequences not bullets 📜 Skill insight ⚙ Maintainability
Description
The Consequences section is not expressed as 3–5 one-sentence bullet points as required. This makes
consequences harder to scan and breaks the standardized ADR format.
Code

docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[R79-87]

+## Consequences
+
+**Easier:** One decided artifact per run; operators and eval loggers can join
+runs to forge/CI and to `run-telemetry.jsonl` via `trace_id`.
+
+**Harder:** Dispatched child runs must inherit forge context via env so the
+child snapshot is complete; GitLab/Bitbucket coverage depends on CI vars or
+`FULLSEND_*` overrides. Implementation is a follow-up issue after this ADR is
+accepted.
Relevance

⭐⭐ Medium

Consequences bullet formatting enforcement is unclear; no closely matching accepted/rejected
precedent on bullets vs prose.

PR-#80
PR-#5244

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The rule requires 3–5 one-sentence bullet points, but the Consequences section contains two bolded
paragraphs and no bullets.

docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[79-87]
Skill: writing-adrs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`## Consequences` is currently prose blocks and does not provide 3–5 one-sentence bullet points.

## Issue Context
Compliance requires consequences to be a short bulleted list to preserve scannability and consistent ADR structure.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[79-87]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. harness-snapshot contract inlined 📜 Skill insight ⚙ Maintainability
Description
ADR 0071 defines a field-level contract for harness-snapshot.json inline (required keys and
semantics) instead of linking to a versioned normative spec. This risks unversioned drift and makes
it harder for downstream consumers to implement against a stable artifact definition.
Code

docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[R44-60]

+Every `fullsend run` writes **`harness-snapshot.json`** into the run output
+directory (next to `run-telemetry.jsonl`) at run start, after the root span
+exists.
+
+Contents are pointers and a config fingerprint only (no diffs, prompts, or
+skill bodies), including at least:
+
+- Harness identity: agent, role, slug, model, skills, harness path
+- `harness_content_sha` (content hash of the resolved harness file)
+- Forge/CI pointers when known: `forge_platform`, `repository_url`,
+  `ref_revision`, `ref_name`, `change_id`, `pipeline_run_id`,
+  `pipeline_run_url`
+- Trace join: `trace_id`, `traceparent`
+
+Forge/CI fields are filled by fullsend when writing the snapshot (`FULLSEND_*`
+overrides first, then standard CI env). Downstream consumers **read the JSON
+file** (and/or later stores that ingest it), not ambient CI env.
Relevance

⭐⭐ Medium

Inlining a JSON contract vs linking a versioned spec is subjective; no closely analogous precedent
found.

PR-#2743

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ADR enumerates required snapshot contents and join keys inline, which is a field-level contract;
the rule requires such contracts to be maintained as versioned normative specs and linked from the
ADR instead of being embedded.

docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[44-60]
Skill: writing-adrs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The ADR includes an inline field-level contract for `harness-snapshot.json` (required keys and semantics).

## Issue Context
Compliance requires detailed contracts (field-level/byte-level artifacts, schemas, canonical snapshots) to live in `docs/normative/<topic>/v<major>/...` and be linked from the ADR.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[44-70]
- docs/normative/** (add versioned contract artifacts)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

7. Ambiguous Level-1 wording 🐞 Bug ⚙ Maintainability
Description
The distributed tracing guide says every run produces “Level 1 artifacts” while also noting
harness-snapshot.json is only proposed and not yet guaranteed, which can momentarily suggest it
exists today. Tightening the opening sentence to clearly separate current behavior from the proposed
artifact would reduce reader confusion.
Code

docs/guides/infrastructure/distributed-tracing.md[R10-20]

+Every `fullsend run` produces Level 1 artifacts in the run output directory with
+no configuration required:

- **`run-telemetry.jsonl`** — OTLP JSON spans covering the run lifecycle
  (sandbox creation, agent iterations, validation) with timestamps, durations,
  trace IDs, and token/cost attributes.
-
-This file is written on every run unless `OTEL_SDK_DISABLED=true`, which
-suppresses all telemetry output including the local file. It contains
-metadata only — no prompts, completions, or source code content.
+- **`harness-snapshot.json`** — proposed in
+  [ADR 0071](../../ADRs/0071-forge-pointer-correlation-for-agent-traces.md)
+  (run-start harness fingerprint and forge/CI pointers). Implementation follows
+  ADR acceptance; until then only `run-telemetry.jsonl` is guaranteed on disk.
+
Relevance

⭐⭐⭐ High

Minor doc wording clarity fixes are commonly accepted to reduce reader confusion.

PR-#3903

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The guide’s baseline section uses plural “artifacts” and includes harness-snapshot.json, but
immediately states only run-telemetry.jsonl is guaranteed until ADR 0071 is implemented; this is a
minor wording ambiguity in the same block.

docs/guides/infrastructure/distributed-tracing.md[8-23]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The guide introduces Level 1 as producing “artifacts” (plural) and then lists `harness-snapshot.json` while also stating it is only proposed and not yet guaranteed; this is slightly ambiguous.

## Issue Context
Make the first sentence explicitly describe the current guaranteed artifact (`run-telemetry.jsonl`) and then separately describe the proposed additional artifact from ADR 0071.

## Fix Focus Areas
- docs/guides/infrastructure/distributed-tracing.md[8-23]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


8. distributed-tracing.md in wrong directory 📜 Skill insight ⌂ Architecture
Description
This guide lives under docs/guides/infrastructure/, but guides must be placed under either
docs/guides/admin/ or docs/guides/user/. Keeping guides outside the required directory structure
breaks the documentation taxonomy and discovery expectations.
Code

docs/guides/infrastructure/distributed-tracing.md[R10-11]

+Every `fullsend run` produces Level 1 artifacts in the run output directory with
+no configuration required:
Relevance

⭐ Low

Similar requests to move guides out of nonstandard subfolders (dev/infrastructure) were previously
rejected.

PR-#4901
PR-#5454
PR-#5457

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The rule requires guides to be under docs/guides/admin/ or docs/guides/user/, but this PR
modifies a guide located under docs/guides/infrastructure/.

docs/guides/infrastructure/distributed-tracing.md[10-19]
Skill: writing-user-docs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`docs/guides/infrastructure/distributed-tracing.md` is not located under the required `docs/guides/admin/` or `docs/guides/user/` directory.

## Issue Context
Compliance requires every guide under `docs/guides/` to live in either the admin or user subtree.

## Fix Focus Areas
- docs/guides/infrastructure/distributed-tracing.md[1-40]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines +16 to +19
- **`harness-snapshot.json`** — proposed in
[ADR 0071](../../ADRs/0071-forge-pointer-correlation-for-agent-traces.md)
(run-start harness fingerprint and forge/CI pointers). Implementation follows
ADR acceptance; until then only `run-telemetry.jsonl` is guaranteed on disk.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Missing > planned: callout 📜 Skill insight ≡ Correctness

The new text describes a not-yet-implemented feature (harness-snapshot.json) without the required
> **Planned:** callout format and issue link. This can mislead readers about current functionality
and removes the required tracking reference.
Agent Prompt
## Issue description
A planned feature is documented without the required `> **Planned:**` blockquote callout and without linking to the relevant tracking issue.

## Issue Context
The guide states `harness-snapshot.json` is only proposed / not yet guaranteed, which is planned functionality and must be formatted accordingly.

## Fix Focus Areas
- docs/guides/infrastructure/distributed-tracing.md[16-20]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +1 to +3
---
title: "71. Harness snapshot and forge pointer correlation for agent traces"
status: Proposed

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

3. Adr 0071 uses proposed 📘 Rule violation ⚙ Maintainability

ADR 0071 declares status: Proposed in its frontmatter and repeats “Proposed” in the body, but the
repository’s ADR lifecycle vocabulary only allows Accepted, Deprecated, or Superseded. This
makes the ADR nonconforming with documented conventions and likely to fail CI/lint validation tied
to ADR status correctness.
Agent Prompt
## Issue description
ADR 0071 uses a `status` value (`Proposed`) in both frontmatter and the body `## Status` section, but the repository’s ADR policy restricts valid statuses to `Accepted`, `Deprecated`, or `Superseded` and indicates CI linting validates ADR status/frontmatter correctness.

## Issue Context
Allowed ADR `status` values are `Accepted`, `Deprecated`, or `Superseded` only.
- If this ADR is intended to be merged as a finalized decision record, update ADR 0071 to use an allowed status value (typically `Accepted`) and align the body `## Status` section accordingly.
- If the intent is to support “Proposed” ADRs in this repository, then ADR 0001 and the ADR lint configuration would need to be updated to include/accept `Proposed` (those config changes are not shown here).
- If the decision is not yet accepted and the process is to only store accepted decisions as ADRs, consider relocating this document to a non-ADR area (e.g., plans/spikes) until it is accepted.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[1-20]
- docs/ADRs/0001-use-adrs-for-decision-making.md[42-63]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +40 to +78
## Decision

### 1. Harness snapshot artifact (Level 1)

Every `fullsend run` writes **`harness-snapshot.json`** into the run output
directory (next to `run-telemetry.jsonl`) at run start, after the root span
exists.

Contents are pointers and a config fingerprint only (no diffs, prompts, or
skill bodies), including at least:

- Harness identity: agent, role, slug, model, skills, harness path
- `harness_content_sha` (content hash of the resolved harness file)
- Forge/CI pointers when known: `forge_platform`, `repository_url`,
`ref_revision`, `ref_name`, `change_id`, `pipeline_run_id`,
`pipeline_run_url`
- Trace join: `trace_id`, `traceparent`

Forge/CI fields are filled by fullsend when writing the snapshot (`FULLSEND_*`
overrides first, then standard CI env). Downstream consumers **read the JSON
file** (and/or later stores that ingest it), not ambient CI env.

`OTEL_SDK_DISABLED=true` suppresses span export (`run-telemetry.jsonl` / OTLP)
but **does not** suppress `harness-snapshot.json` — it is the run-start config
contract, not span export.

### 2. Root span attributes (Level 1 + Level 2)

The same join keys are set on the root `run` span (`vcs.*`, `cicd.*`,
harness content SHA, forge platform) so OTLP backends receive them without
parsing the JSON. Local JSON remains the forensic / handoff contract.

### 3. What we do not do

- Do **not** treat eval scripts’ CI env exports as the harness-snapshot path.
- Do **not** embed PR diffs or prompt content in the snapshot.
- Do **not** redefine cross-project report field ownership in this ADR; link
the shared join contract from Related.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

4. Adr 0071 has multiple decisions 📜 Skill insight ⚙ Maintainability

ADR 0071 makes multiple distinct decisions (snapshot artifact, root span attributes, and explicit
non-decisions) instead of recording exactly one decision. This reduces traceability and makes it
harder to supersede or refine individual decisions cleanly.
Agent Prompt
## Issue description
The ADR contains multiple separate decisions under `## Decision` (numbered subsections) rather than a single decision.

## Issue Context
Compliance requires each ADR to record exactly one decision; separate decisions should be split into separate ADRs or narrowed so the ADR has one core decision.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[40-78]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +79 to +87
## Consequences

**Easier:** One decided artifact per run; operators and eval loggers can join
runs to forge/CI and to `run-telemetry.jsonl` via `trace_id`.

**Harder:** Dispatched child runs must inherit forge context via env so the
child snapshot is complete; GitLab/Bitbucket coverage depends on CI vars or
`FULLSEND_*` overrides. Implementation is a follow-up issue after this ADR is
accepted.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

5. Adr 0071 consequences not bullets 📜 Skill insight ⚙ Maintainability

The Consequences section is not expressed as 3–5 one-sentence bullet points as required. This makes
consequences harder to scan and breaks the standardized ADR format.
Agent Prompt
## Issue description
`## Consequences` is currently prose blocks and does not provide 3–5 one-sentence bullet points.

## Issue Context
Compliance requires consequences to be a short bulleted list to preserve scannability and consistent ADR structure.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[79-87]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +21 to +42
## Context

[ADR 0050](0050-distributed-tracing-instrumentation.md) defines how fullsend
generates traces (OTel Go SDK; Level 1 = `run-telemetry.jsonl`; Level 2 =
OTLP). [Operational observability](../problems/operational-observability.md)
requires forge **pointers** (repo + SHA, change id, pipeline run) rather than
duplicating diffs, and a stable answer to: “what harness/config produced this
run?”

After the OTel SDK migration, `run-summary.json` was removed; the sole Level 1
telemetry file is `run-telemetry.jsonl`. Eval wrappers that `export` ambient CI
variables are the wrong layer: harness identity is a **run-time** concern of
`fullsend run`, and downstream tools must not scrape CI env as the source of
truth.

Cross-project join field semantics (Provenance / MLflow tag names) live in the
shared join contract maintained with the certification report schema; this ADR
decides only what **fullsend** writes.

## Decision

### 1. Harness snapshot artifact (Level 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

6. Adr 0071 missing ## options 📜 Skill insight ⚙ Maintainability

ADR 0071 does not include the ## Options section from the ADR template. This deviates from the
required ADR structure and omits the standardized place to capture alternatives.
Agent Prompt
## Issue description
The ADR omits the `## Options` section required by the ADR template structure.

## Issue Context
The project ADR template includes an `## Options` section (optional only when genuinely unnecessary). This ADR discusses at least one alternative approach (e.g., relying on eval scripts/CI env), so the template section should be present to document options.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[21-42]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +44 to +60
Every `fullsend run` writes **`harness-snapshot.json`** into the run output
directory (next to `run-telemetry.jsonl`) at run start, after the root span
exists.

Contents are pointers and a config fingerprint only (no diffs, prompts, or
skill bodies), including at least:

- Harness identity: agent, role, slug, model, skills, harness path
- `harness_content_sha` (content hash of the resolved harness file)
- Forge/CI pointers when known: `forge_platform`, `repository_url`,
`ref_revision`, `ref_name`, `change_id`, `pipeline_run_id`,
`pipeline_run_url`
- Trace join: `trace_id`, `traceparent`

Forge/CI fields are filled by fullsend when writing the snapshot (`FULLSEND_*`
overrides first, then standard CI env). Downstream consumers **read the JSON
file** (and/or later stores that ingest it), not ambient CI env.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

7. harness-snapshot contract inlined 📜 Skill insight ⚙ Maintainability

ADR 0071 defines a field-level contract for harness-snapshot.json inline (required keys and
semantics) instead of linking to a versioned normative spec. This risks unversioned drift and makes
it harder for downstream consumers to implement against a stable artifact definition.
Agent Prompt
## Issue description
The ADR includes an inline field-level contract for `harness-snapshot.json` (required keys and semantics).

## Issue Context
Compliance requires detailed contracts (field-level/byte-level artifacts, schemas, canonical snapshots) to live in `docs/normative/<topic>/v<major>/...` and be linked from the ADR.

## Fix Focus Areas
- docs/ADRs/0071-forge-pointer-correlation-for-agent-traces.md[44-70]
- docs/normative/** (add versioned contract artifacts)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +10 to +20
Every `fullsend run` produces Level 1 artifacts in the run output directory with
no configuration required:

- **`run-telemetry.jsonl`** — OTLP JSON spans covering the run lifecycle
(sandbox creation, agent iterations, validation) with timestamps, durations,
trace IDs, and token/cost attributes.

This file is written on every run unless `OTEL_SDK_DISABLED=true`, which
suppresses all telemetry output including the local file. It contains
metadata only — no prompts, completions, or source code content.
- **`harness-snapshot.json`** — proposed in
[ADR 0071](../../ADRs/0071-forge-pointer-correlation-for-agent-traces.md)
(run-start harness fingerprint and forge/CI pointers). Implementation follows
ADR acceptance; until then only `run-telemetry.jsonl` is guaranteed on disk.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Informational

8. Ambiguous level-1 wording 🐞 Bug ⚙ Maintainability

The distributed tracing guide says every run produces “Level 1 artifacts” while also noting
harness-snapshot.json is only proposed and not yet guaranteed, which can momentarily suggest it
exists today. Tightening the opening sentence to clearly separate current behavior from the proposed
artifact would reduce reader confusion.
Agent Prompt
## Issue description
The guide introduces Level 1 as producing “artifacts” (plural) and then lists `harness-snapshot.json` while also stating it is only proposed and not yet guaranteed; this is slightly ambiguous.

## Issue Context
Make the first sentence explicitly describe the current guaranteed artifact (`run-telemetry.jsonl`) and then separately describe the proposed additional artifact from ADR 0071.

## Fix Focus Areas
- docs/guides/infrastructure/distributed-tracing.md[8-23]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant