Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/reference/python-api/result-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ Removes or replaces identifying data in results so they can be shared.
<span id="benchbox.core.results.anonymization.AnonymizationManager.get_anonymous_machine_id"></span>
<span id="get_anonymous_machine_id"></span>

**Returns:** `str`, an identifier used in anonymized results. The value may recur across related output and should not be treated as an anonymity or trust signal.
**Returns:** `str`, an identifier used in anonymized results. The value recurs across related output and should not be treated as an anonymity or trust signal.

```python
from benchbox.core.results.anonymization import AnonymizationManager
Expand Down Expand Up @@ -660,7 +660,7 @@ True
<span id="benchbox.core.results.anonymization.AnonymizationManager.anonymize_tuning_payload"></span>
<span id="anonymize_tuning_payload"></span>

Anonymizes a tuning companion payload while preserving the corresponding identifier values used in the related result payload.
Anonymizes a tuning companion payload with identifier values consistent with the related result payload.

| Name | Type | Default | Meaning |
| --- | --- | --- | --- |
Expand Down
14 changes: 14 additions & 0 deletions tests/unit/scripts/test_site_parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,20 @@ def test_project_allowance_preserves_legacy_atom_ids_and_allows_canonical_links(
assert allowed["canonical-atom-entry-links"]["owner_approval"] == "approved"


def test_canonical_atom_allowance_rejects_id_loss_and_canonical_link_loss() -> None:
rules = site_inventory.load_allowed_differences(site_parity.DEFAULT_ALLOWED)
report = {kind: [] for kind in site_inventory.REPORT_KINDS}
report["feed regression"] = [
"/blog/atom.xml: entry https://benchbox.dev/blog/blog/a.html removed",
"/blog/atom.xml: entry https://benchbox.dev/blog/blog/a.html lost link /blog/a.html",
]

remaining, allowed = site_inventory.apply_allowed_differences(report, rules)

assert allowed["canonical-atom-entry-links"] == []
assert remaining["feed regression"] == report["feed regression"]


def test_browser_failures_fail_the_report(tmp_path: Path) -> None:
baseline = _site(tmp_path / "base", theme=False, feed_link="/blog/a.html")
candidate = _site(tmp_path / "cand", theme=False, feed_link="/blog/a.html")
Expand Down
3 changes: 2 additions & 1 deletion website/src/lib/atom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { atomTimestamp, BLOG_BASE_URL, BLOG_TITLE, feedCategory, FEED_LENGTH, ne

const SITE_ORIGIN = "https://benchbox.dev";
const GENERATOR = { uri: "https://astro.build/", name: "Astro" };
const LEGACY_FEED_ID_BASE = `${BLOG_BASE_URL}blog/`;

export function feedEntryUrl(post: Pick<BlogPost, "slug">): string {
return `${BLOG_BASE_URL}${post.slug}.html`;
Expand Down Expand Up @@ -59,7 +60,7 @@ function summaryOf(post: BlogPost): string {

function entry(post: BlogPost): string {
const stamp = atomTimestamp(post.date);
const entryId = `${BLOG_BASE_URL}blog/${post.slug}.html`;
const entryId = `${LEGACY_FEED_ID_BASE}${post.slug}.html`;
const url = feedEntryUrl(post);
const lines = [
" <entry>",
Expand Down
Loading