@@ -871,8 +871,12 @@ describe("compaction-safeguard recent-turn preservation", () => {
|
871 | 871 | const identifiers = extractOpaqueIdentifiers( |
872 | 872 | "Track id a1b2c3d4e5f6 plus A1B2C3D4E5F6 and URL https://example.com/a and /tmp/x.log plus port host.local:18789", |
873 | 873 | ); |
874 | | -expect(identifiers.length).toBeGreaterThan(0); |
875 | | -expect(identifiers).toContain("A1B2C3D4E5F6"); // pragma: allowlist secret |
| 874 | +expect(identifiers).toStrictEqual([ |
| 875 | +"A1B2C3D4E5F6", // pragma: allowlist secret |
| 876 | +"https://example.com/a", |
| 877 | +"/tmp/x.log", |
| 878 | +"host.local:18789", |
| 879 | +]); |
876 | 880 | |
877 | 881 | const summary = [ |
878 | 882 | "## Decisions", |
@@ -940,7 +944,15 @@ describe("compaction-safeguard recent-turn preservation", () => {
|
940 | 944 | latestAsk: "Need a status update", |
941 | 945 | }); |
942 | 946 | expect(quality.ok).toBe(false); |
943 | | -expect(quality.reasons.length).toBeGreaterThan(0); |
| 947 | +expect(quality.reasons).toStrictEqual([ |
| 948 | +"missing_section:## Decisions", |
| 949 | +"missing_section:## Open TODOs", |
| 950 | +"missing_section:## Constraints/Rules", |
| 951 | +"missing_section:## Pending user asks", |
| 952 | +"missing_section:## Exact identifiers", |
| 953 | +"missing_identifiers:abc12345", |
| 954 | +"latest_user_ask_not_reflected", |
| 955 | +]); |
944 | 956 | }); |
945 | 957 | |
946 | 958 | it("requires exact section headings instead of substring matches", () => { |
|