Skip to content

[RUM-13811] Add feature doc sync system for *_FEATURE.md files#2886

Open
mariedm wants to merge 10 commits into
developfrom
mariedm/RUM-13811/feature-docs-sync
Open

[RUM-13811] Add feature doc sync system for *_FEATURE.md files#2886
mariedm wants to merge 10 commits into
developfrom
mariedm/RUM-13811/feature-docs-sync

Conversation

@mariedm
Copy link
Copy Markdown
Member

@mariedm mariedm commented May 5, 2026

What and why

RUM_FEATURE.md and SESSION_REPLAY_FEATURE.md had drifted from the current public API (last verified against SDK 3.3.0). This PR refreshes them to 3.10.0 and puts a CI guard in place so they can't silently drift again — covering not just the docs themselves, but every place that hand-lists them (AGENTS.md, the LLM guidelines, and the Confluence publish workflow).

What changes

Three moving parts:

  1. The docs. RUM_FEATURE.md and SESSION_REPLAY_FEATURE.md brought up to SDK 3.10.0. Each doc gains YAML frontmatter (tracked_files, verified_against_commit) so it is its own source of truth for what to watch.

  2. A verify scripttools/feature-docs-verify.sh, run via make feature-docs-verify, wired into a new Feature Docs Verify GitLab CI job on release/* and hotfix/* branches. It checks two things for every discovered *_FEATURE.md:

    • the doc is up to date vs. its tracked source files;
    • the doc is registered in AGENTS.md, docs/LLM_FEATURE_DOCS_GUIDELINES.md, and .github/workflows/changelog-to-confluence.yaml.
  3. A Claude Code skill/dd-sdk-ios:update-feature-docs — that owns the refresh workflow, including keeping those three registries in sync when a doc is added/renamed/removed. Engineers don't need to memorize the touchpoints; the script + skill close the loop.

Read more in this internal doc.

Notable

  • Workflow bug fix. changelog-to-confluence.yaml had leading slashes in its `paths:` filter (`'/DatadogRUM/RUM_FEATURE.md'`), which never match in GitHub Actions filters. The pages still got published, but only as a side effect of `CHANGELOG.md` triggering the workflow on releases (the `cp` block always runs once triggered). Doc-only updates have never triggered publishing on their own. Removed.
  • Single failure recipe. Every failure mode in the verify script tells the engineer the same thing: run the skill, run `make feature-docs-verify` to confirm, push.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes
  • Add Objective-C interface for public APIs - see our guidelines (internal)
  • Run `make api-surface` when adding new APIs

@mariedm mariedm force-pushed the mariedm/RUM-13811/feature-docs-sync branch from 3b8fec5 to 4bbe62d Compare May 7, 2026 11:27
@mariedm
Copy link
Copy Markdown
Member Author

mariedm commented May 7, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4bbe62d430

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/feature-docs-verify.sh Outdated
@mariedm mariedm marked this pull request as ready for review May 8, 2026 15:27
@mariedm mariedm requested review from a team as code owners May 8, 2026 15:27
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0610945b93

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/feature-docs-verify.sh Outdated
@mariedm mariedm marked this pull request as draft May 8, 2026 15:35
@mariedm mariedm force-pushed the mariedm/RUM-13811/feature-docs-sync branch 2 times, most recently from 6bc779c to b584ef3 Compare May 8, 2026 16:55
@mariedm
Copy link
Copy Markdown
Member Author

mariedm commented May 8, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b584ef3afc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .gitlab-ci.yml
Comment thread DatadogRUM/RUM_FEATURE.md Outdated
@mariedm
Copy link
Copy Markdown
Member Author

mariedm commented May 11, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cab13ec55e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread DatadogRUM/RUM_FEATURE.md
@mariedm mariedm marked this pull request as ready for review May 12, 2026 13:02
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cab13ec55e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread DatadogSessionReplay/SESSION_REPLAY_FEATURE.md Outdated
mariedm added 10 commits May 12, 2026 17:55
Per review feedback, the workflow registration check now verifies the
two distinct contexts (the trigger paths: filter and the cp block)
separately. Previously a single substring match would silently pass if
only one of the two was present, which left a footgun where a doc-only
update would not trigger publishing, or the page would never get
copied.
`git diff <commit>..HEAD -- <missing-path>` exits 0 with empty stdout,
so a typo or stale renamed path in a doc's frontmatter would silently
report as "up to date". Validate each tracked path resolves to a file
in the working tree before invoking git diff, and surface the missing
entries with the standard fix recipe.
Multiple coverage gaps in the RUM and Session Replay feature docs
flagged across two review passes:

- RUM: tracked_files was missing DatadogRUM/Sources/RUMMonitor.swift.
  The doc's "Public API" section documents `RUMMonitor.shared(in:)`
  (the entry point for manual instrumentation), but the file was not
  tracked, so changes there could drift the doc while CI stayed green.

- Session Replay: tracked_files was missing three public-API source
  files explicitly referenced in the doc's "Key Files" section:
    - SessionReplayPrivacyOverrides.swift (UIKit per-view privacy)
    - SessionReplayPrivacyView.swift (SwiftUI per-view privacy)
    - DatadogInternal/.../SessionReplayConfiguration.swift (privacy
      level enums)

- Session Replay: doc enumerated SessionReplay.Configuration.FeatureFlag
  cases but omitted the still-public deprecated `screenChangeScheduling`.
  Document it in both the Quick Start example comment and the
  "Available feature flags" reference list, with a clear deprecation
  note.

Strengthen the update-feature-docs skill to prevent both classes of
issue from recurring:

- Step 2 now audits tracked_files coverage against the doc's "Key Files"
  section. Every public-API source file path referenced in Key Files
  must also appear in tracked_files. The audit happens before the diff
  in step 3, otherwise drift in untracked files is silently ignored.

- Step 5 now explicitly calls out deprecated public cases. Deprecated
  `@available(*, deprecated, message:)` enum cases, methods, and
  properties remain on the public API and must be documented with a
  deprecation note.

The audit step in step 2 caught the additional RUM and SR gaps when
the skill was re-run — confirming the prevention works.

Bump verified_against_commit and last_updated on both docs.
Swift named-argument calls must follow the initializer declaration
order. In RUMConfiguration.init, trackSlowFrames sits between
trackMemoryWarnings and telemetrySampleRate, but the Quick Start
snippet placed it after telemetrySampleRate and collectAccessibility,
so copy-pasting the example produced an "argument 'trackSlowFrames'
must precede argument 'telemetrySampleRate'" compile error.

Move trackSlowFrames into the correct slot and bump frontmatter.
GitLab CI shallow-clones at depth 20 by default. tools/feature-docs-verify.sh
runs `git diff <verified_against_commit>..HEAD` per doc, which requires
the baseline commit to be in the local history. On release/hotfix
branches, any doc whose verified_against_commit is older than 20
commits would otherwise silently fail the diff before the script can
actually verify anything — turning a CI configuration quirk into a
doc-verification false alarm.

Stable feature docs that go several releases without changes would hit
this every time on any bounded depth. The job is scoped to release/*
and hotfix/* branches (a handful of runs per release cycle), so a full
clone is the simplest reliable answer.
@mariedm mariedm force-pushed the mariedm/RUM-13811/feature-docs-sync branch from 64219c2 to 743ff7e Compare May 12, 2026 15:55
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