mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 13:12:50 +00:00
fix(upstream): flag incomplete framework comparisons (#583)
* fix(upstream): flag incomplete framework comparisons * docs(changelog): record fix for #583
This commit is contained in:
1 parent
991bda5dd2
commit
a748d89fe6
3 files changed
+36
-1
No files matched your search
@@ -179,6 +179,8 @@ per-file diff commands.
|
||||
(`json|table|plain` for search, `json|plain` for detail) and exit 1 with `{ error, code: "BAD_ARG" }`
|
||||
on invalid options.
|
||||
|
||||
- **Upstream checks report incomplete comparisons** (#583) - missing base or head framework files now remain visible as incomplete comparisons instead of being reported as unchanged.
|
||||
|
||||
- **`jobdanmark-search detail` no longer keeps a malformed closing tag as text on the
|
||||
rendered-HTML branch** (#525, `detail.ts`, `tests/detail-parsing.test.ts`) - a live page wrote
|
||||
its Jobtype item as `Fuldtid </ li >`, and because `node-html-parser` does not recognise a
|
||||
|
||||
@@ -160,5 +160,37 @@ class UpstreamRefMissingFileTests(UpstreamCheckerRepoFixture):
|
||||
self.assertIn("[WARNING]", result.stdout)
|
||||
|
||||
|
||||
class IncompleteComparisonTests(UpstreamCheckerRepoFixture):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.add_remote("upstream", TEMPLATE_URL)
|
||||
self.materialize_remote_ref("upstream")
|
||||
|
||||
def test_missing_local_file_does_not_report_all_files_up_to_date(self):
|
||||
(self.root / "AGENTS.md").unlink()
|
||||
|
||||
result = self.run_checker()
|
||||
|
||||
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
|
||||
self.assertIn("AGENTS.md", result.stdout)
|
||||
self.assertIn("[WARNING] Framework check incomplete", result.stdout)
|
||||
self.assertNotIn("[OK]", result.stdout)
|
||||
|
||||
def test_missing_upstream_marker_does_not_report_all_files_up_to_date(self):
|
||||
agents = self.root / "AGENTS.md"
|
||||
agents.write_text("# Upstream guidelines without a version marker\n", encoding="utf-8")
|
||||
subprocess.run(["git", "add", "AGENTS.md"], cwd=self.root, check=True, capture_output=True)
|
||||
subprocess.run(["git", "commit", "-qm", "remove upstream version marker"], cwd=self.root, check=True, capture_output=True)
|
||||
self.materialize_remote_ref("upstream")
|
||||
agents.write_text(FRONTMATTER, encoding="utf-8")
|
||||
|
||||
result = self.run_checker()
|
||||
|
||||
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
|
||||
self.assertIn("AGENTS.md", result.stdout)
|
||||
self.assertIn("[WARNING] Framework check incomplete", result.stdout)
|
||||
self.assertNotIn("[OK]", result.stdout)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -119,7 +119,7 @@ def main() -> int:
|
||||
for rel_path in FRAMEWORK_FILES:
|
||||
local_path = ROOT / rel_path
|
||||
if not local_path.exists():
|
||||
print(f"Local file missing: {rel_path}")
|
||||
errors.append(f"Local file missing: {rel_path}")
|
||||
continue
|
||||
|
||||
# Get local version
|
||||
@@ -145,6 +145,7 @@ def main() -> int:
|
||||
errors.append(f"Local file {rel_path} is missing 'framework_version' in frontmatter.")
|
||||
continue
|
||||
if not upstream_ver:
|
||||
errors.append(f"Upstream file {rel_path} is missing 'framework_version' in frontmatter.")
|
||||
continue
|
||||
|
||||
if parse_semver(upstream_ver) > parse_semver(local_ver):
|
||||
|
||||
Reference in new issue
Block a user